From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Barry Bell <Barry.Bell@hartehanks.com>
To: Hiroshi Saito <hiroshi@winpg.jp>
To: Michael Paquier <michael.paquier@gmail.com>
To: Hiroshi Inoue <inoue@tpf.co.jp>
Cc: Heikki Linnakangas <hlinnakangas@vmware.com>
Cc: Anna Gershnik <agershnik@tableausoftware.com>
Cc: pgsql-odbc@postgresql.org <pgsql-odbc@postgresql.org>
Subject: Re: psqlODBC text length with no records
Date: Tue, 13 May 2014 17:27:33 -0700
Message-ID: <5372B875.3010407@aklaver.com> (raw)
In-Reply-To: <152de38c9c2544b9b61f9a2f77e9aa3d@BY2PR08MB281.namprd08.prod.outlook.com>
References: <152de38c9c2544b9b61f9a2f77e9aa3d@BY2PR08MB281.namprd08.prod.outlook.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-odbc>
On 05/13/2014 07:04 AM, Barry Bell wrote:
> Hi:
> When calling PostgresODBC (ver 9.2.1) using the following settings for VFP(Foxpro)
> BI=2;TextAsLongVarchar=1;UnknownSizes=2;UseServerSidePrepare=1;B0=254;B7=1;C5=0;AB=8;" && Debug=1;B2=1
>
> Select initcap(name) cname from customers (where name is type varchar)
> If records are returned, Returns pname as the varchar of length of the field (varchar 30 in this case)
So I am going to assume you mean cname above.
> But if I run
> Select initcap(name) cname from customers where 1=0 (no records returns)
> If no records return, cname field as "Memo" (like a CLOB) or longvarchar
>
> In my connection string, I am setting B0=254 meaning any strings under 254 chracter should be varchar and over 255 should by longchar type(Memo).
> And any unknown as longchar type(Unknownsizes=2)
Well according to here:
http://psqlodbc.projects.pgfoundry.org/docs/config.html
you should not need to use Unknownsizes for 6.4+ versions of Postgres
or if you do use Maximum.
>
> I cannot find any setting that will return the cname field as a varchar (short char), instead of a longchar type(Memo, CLOB)
>
> Any ideas?
>
> Barry Bell
>
--
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-odbc@postgresql.org
Cc: adrian.klaver@aklaver.com, Barry.Bell@hartehanks.com, hiroshi@winpg.jp, michael.paquier@gmail.com, inoue@tpf.co.jp, hlinnakangas@vmware.com, agershnik@tableausoftware.com
Subject: Re: psqlODBC text length with no records
In-Reply-To: <5372B875.3010407@aklaver.com>
References: <152de38c9c2544b9b61f9a2f77e9aa3d@BY2PR08MB281.namprd08.prod.outlook.com> <5372B875.3010407@aklaver.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox