Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZK4kh-00087T-C0 for pgsql-odbc@arkaria.postgresql.org; Tue, 28 Jul 2015 13:17:03 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZK4kg-0002hB-US for pgsql-odbc@arkaria.postgresql.org; Tue, 28 Jul 2015 13:17:02 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZK4kg-0002fc-2l for pgsql-odbc@postgresql.org; Tue, 28 Jul 2015 13:17:02 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZK4kd-0003xk-71 for pgsql-odbc@postgresql.org; Tue, 28 Jul 2015 13:17:01 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 3C66120A4C for ; Tue, 28 Jul 2015 09:16:57 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute3.internal (MEProxy); Tue, 28 Jul 2015 09:16:57 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=aklaver.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=icCo5EUQoA1uXBaZY0OenlIU2+s=; b=ousBbr 0sEcPowH80SlV3ZBNLfg3MFf050QK+kPEB8hVHuD267ZIn8DA64bIybVXKfkx5Gl iM3k5V2AZWZRGC785/ARR+hL0VY+sT6q6zhx2TXIqeOmyfZAZk3D97JP6+Ii/WOH aLsitTsAvQB9y5vXkZ8brGKkAB9i0XpU4Q2n4= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=icCo5EUQoA1uXBa ZY0OenlIU2+s=; b=m2cluwTEw8MTtKQlPAuXtZ5SYPN9ah6lvx9gi8NpAgJYO56 t8VsO8H+/SWw/1tob9ckgLO3otAmssvQ3DjLs4cCzTEJukXC87SlaJVEtiODarEV QVwP0oU0howObdd2llZ48dTVulEGe5L6zGBnowDReV6JkyndjWw+M4EbJKMo= X-Sasl-enc: AaC+rCPNMXsCjFprEHrwhuyII7awJNsh3ToiO1/B/Ohb 1438089416 Received: from [192.168.1.2] (97-113-26-19.tukw.qwest.net [97.113.26.19]) by mail.messagingengine.com (Postfix) with ESMTPA id A9E2AC0001C; Tue, 28 Jul 2015 09:16:56 -0400 (EDT) Subject: Re: PSQLODBC.DLL - The (maximum) expected data length is 8000, while the returned data length is 9606. To: "Jens Sorensen (Intuii)" , pgsql-odbc@postgresql.org References: <4854fc01d0c6cb$fc0c0010$f4240030$@Intuii.com> <55B656AD.6020800@aklaver.com> <8FB820A2-C966-42A5-B5D2-BA4BA7170BC3@Intuii.com> <55B6609A.7070108@aklaver.com> From: Adrian Klaver Message-ID: <55B780BD.6000700@aklaver.com> Date: Tue, 28 Jul 2015 06:16:45 -0700 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-odbc Precedence: bulk Sender: pgsql-odbc-owner@postgresql.org On 07/27/2015 11:18 PM, Jens Sorensen (Intuii) wrote: > Thanks, > > I've replaced the 'text' column. > > Here is the error messages when I use 'varchar(max)': > > Msg 7347, Level 16, State 1, Procedure RetrieveHttpEvents, Line 18 > OLE DB provider 'MSDASQL' for linked server '(null)' returned data that does not match expected data length for column '[MSDASQL].uri'. The (maximum) expected data length is 8000, while the returned data length is 9606. > > And here is the error messages when I use 'varchar(max)': > > Msg 7347, Level 16, State 1, Procedure RetrieveHttpEvents, Line 18 > OLE DB provider 'MSDASQL' for linked server '(null)' returned data that does not match expected data length for column '[MSDASQL].uri'. The (maximum) expected data length is 8000, while the returned data length is 9606. > > So unfortunately this does not appear to have made a difference. > > Here is my current query on SQL Server: > > > What additional information can I provide you that would be useful? > You are doing a server to server transformation where psqlodbc is just one component in the mix. It would be helpful to have the entire transformation laid out in schematic for: Postgres --> psqlodbc ????? --> SQL Server Also where are the error message above coming from? I see reference to Procedure RetrieveHttpEvents, so my guess somewhere in the middle part of the diagram above. Also when you say replaced 'text' column, where are you doing that, the Postgres server, SQL server or somewhere else? What is the actual CREATE TABLE definition for the tables on Postgres and SQL Server? Remember we are not looking at your set up directly, we only have what you provide and the more you provide the better. -- Adrian Klaver adrian.klaver@aklaver.com -- Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-odbc