Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WkN2v-0005pu-5X for pgsql-odbc@arkaria.postgresql.org; Wed, 14 May 2014 00:27:45 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WkN2u-0001QC-DM for pgsql-odbc@arkaria.postgresql.org; Wed, 14 May 2014 00:27:44 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WkN2t-0001Q0-Cl for pgsql-odbc@postgresql.org; Wed, 14 May 2014 00:27:43 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WkN2p-0000ll-9C for pgsql-odbc@postgresql.org; Wed, 14 May 2014 00:27:42 +0000 Received: from compute5.internal (compute5.nyi.mail.srv.osa [10.202.2.45]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id 51F9321118; Tue, 13 May 2014 20:27:36 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute5.internal (MEProxy); Tue, 13 May 2014 20:27:36 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=aklaver.com; h= message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; s=mesmtp; bh=Spdq2vpXIKdo035v1GFlhQJecYw=; b=byb6fPUmS+LUUDQMFsXj5O11VETh CKYOpgLQOm4U7jQ1/cZqbaIeCLeKjB2CuPKd2W98xuT2hbgurbEn9pjoS0fn+re0 /yDLoeaI+rrLwk3+g53xmwpOGfhlFx0NYvYIFsQPoTj2PPkF1SIaW6kbpzsYOIU6 olVLLuhfjKSyEGM= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=message-id:date:from:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; s=smtpout; bh=Spdq2vpXIKdo035v1GFlhQ JecYw=; b=mC7/4AxhudkGG16GJtPsA0RnH9I8iERJSpRN1UXwhif36wH/F6G1Pl dtfKyiUic0dWN26bSL9bKhAe+MCkn6fquqkktVifAZggzTL7q1TIA0retFwoekGi +1Y9mFwPBQ222r+SsmLe2/qbdznuAO+KpVhFKkhU5CROu0qsMJP3Q= X-Sasl-enc: OUJlqFshcs5A7WgczWsbI4E8tWDt7lnsh9JmtHGTmeAe 1400027255 Received: from panda.site (unknown [65.102.186.57]) by mail.messagingengine.com (Postfix) with ESMTPA id F186F680096; Tue, 13 May 2014 20:27:34 -0400 (EDT) Message-ID: <5372B875.3010407@aklaver.com> Date: Tue, 13 May 2014 17:27:33 -0700 From: Adrian Klaver User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: Barry Bell , Hiroshi Saito , Michael Paquier , Hiroshi Inoue CC: Heikki Linnakangas , Anna Gershnik , "pgsql-odbc@postgresql.org" Subject: Re: psqlODBC text length with no records References: <152de38c9c2544b9b61f9a2f77e9aa3d@BY2PR08MB281.namprd08.prod.outlook.com> In-Reply-To: <152de38c9c2544b9b61f9a2f77e9aa3d@BY2PR08MB281.namprd08.prod.outlook.com> Content-Type: text/plain; charset=ISO-8859-1; 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 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