Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 551996500D9 for ; Fri, 22 Aug 2008 13:16:36 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 06940-10 for ; Fri, 22 Aug 2008 13:16:24 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from s428.sureserver.com (s428.sureserver.com [64.14.74.50]) by postgresql.org (Postfix) with ESMTP id C673864FD35 for ; Fri, 22 Aug 2008 13:16:20 -0300 (ADT) Received: (qmail 13133 invoked by uid 504); 22 Aug 2008 16:16:13 -0000 Received: from unknown (HELO ?127.0.0.1?) (btodd@dbginc.com@63.147.41.232) by ns1.s428.sureserver.com with ESMTPA; 22 Aug 2008 16:16:13 -0000 Message-ID: <48AEE64D.3090800@dbginc.com> Date: Fri, 22 Aug 2008 09:16:13 -0700 From: Bill User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: pgsql-odbc@postgresql.org Subject: Text field truncated using ADO/ODBC Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200808/18 X-Sequence-Number: 9578 I am new to PostgreSQL and running 8.3 on Windows. I am connecting using ADO and the ODBC driver. I have a table the contains a Varchar(80) column and a Text column as well as a couple of integer and datetime columns. My connection string contains TextAsLongVarchar=1 and MaxLongVarcharSize=65536, however, my Text column is being truncated at 254 bytes (the value of MaxVarcharSize). Adding UnknownAsLongVarchar=1 to the connection string causes ADO to see Text column as LongVarchar and return its complete value but it also causes the Varchar column to be seen as LongVarChar. This suggests that the driver sees both Text and Varchar as unknown types. What must I do to get the ODBC driver to see the Text column as LongVarchar and the Varchar column as Varchar? The complete connection string follows by signature. Thanks. Bill Provider=MSDASQL.1;Extended Properties="DRIVER={PostgreSQL ANSI};DATABASE=app;SERVER=localhost;PORT=5432;UID=postgres;PWD=*;SSLmode=disable;ReadOnly=0;Protocol=7.4-1;FakeOidIndex=0;ShowOidColumn=0;RowVersioning=0;ShowSystemTables=0;ConnSettings=;Fetch=100;Socket=4096;UnknownSizes=0;MaxVarcharSize=2048;MaxLongVarcharSize=65536;Debug=0;CommLog=0;Optimizer=1;Ksqo=1;UseDeclareFetch=0;TextAsLongVarchar=1;UnknownsAsLongVarchar=0;BoolsAsChar=1;Parse=0;CancelAsFreeStmt=0;ExtraSysTablePrefixes=dd_;;LFConversion=1;UpdatableCursors=1;DisallowPremature=0;TrueIsMinus1=0;BI=0;ByteaAsLongVarBinary=0;UseServerSidePrepare=0;LowerCaseIdentifier=0;XaOpt=1"