Re: psqlODBC text length with no records - Mailing list pgsql-odbc

From Adrian Klaver
Subject Re: psqlODBC text length with no records
Date
Msg-id 53736874.2090905@aklaver.com
Whole thread Raw
In response to psqlODBC text length with no records  (Barry Bell <Barry.Bell@hartehanks.com>)
Responses Re: psqlODBC text length with no records
List pgsql-odbc
On 05/14/2014 05:51 AM, Barry Bell wrote:
> Tried every setting for unknown size
> Abd every settubg fir date tyoe options.
>   and it always comes back as SQllongvarchar (Memo, CLOB).
>
> The "    Text as LongVarChar: PostgreSQL TEXT type is mapped to SQLLongVarchar, otherwise SQLVarchar." Is not working
whenno records are returned 
>
> It will work if the initcap function is not used.
>
> Try it yourself with this sql statement:
>
> SELECT initcap('ABCDEF') vv FROM dual WHERE 1=0
>
> Will return the a sqlongvarchar(Memo,CLOB)

I do not have an ODBC test set up available right now.

FYI initcap returns TEXT:

http://www.postgresql.org/docs/9.3/interactive/functions-string.html

initcap(string)     text


So what happens if you cast to varchar?:

SELECT initcap('ABCDEF')::varchar vv FROM dual WHERE 1=0

>
>
>


--
Adrian Klaver
adrian.klaver@aklaver.com


pgsql-odbc by date:

Previous
From: Nick Gorham
Date:
Subject: Re: ODBC : SQLGetData question
Next
From: Adrian Klaver
Date:
Subject: Re: psqlODBC text length with no records