From: | "Hiroshi Inoue" <Inoue(at)tpf(dot)co(dot)jp> |
---|---|
To: | "Tom Ince" <tom(dot)ince(at)netzero(dot)net> |
Cc: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: ODBC Error while selecting a numeric data field |
Date: | 2002-07-16 15:54:38 |
Message-ID: | EKEJJICOHDIEMGPNIFIJOEMEIGAA.Inoue@tpf.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
> -----Original Message-----
> From: Tom Ince
>
> Well, I have managed to get the ODBC SQL select call to work with the
> NUMERIC database type.
>
> In the Windows ODBC Help file there is a section called "Converting Data
> from SQL to C Data Types"
>
> In this section there is a chart which shows the default
> conversion for the
> SQL_NUMERIC data type to
> a C data type is SQL_C_CHAR. So I made a stab and used that in my
> SQLBindCol statement and it worked!
>
> Here is my SQLBindCol statement that didn't work :
> rc = SQLBindCol ( hstmt, i+1, SQL_C_NUMERIC, &fields[i].variant.f_numeric,
> fields[i].size, &fields[i].length );
>
> and here is the one that now works :
> rc = SQLBindCol ( hstmt, i+1, SQL_C_CHAR, &fields[i].variant.f_char,
> fields[i].size, &fields[i].length );
>
> I am still a little curious as to why the original way did not work, if
> anyone can point that out to me it would be
> greatly appreciated...
SQL_C_NUMERIC is an ODBC3.X type.
Psqlodbc driver is ODBC2.50.
regards,
Hiroshi Inoue
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2002-07-16 16:09:45 | Re: Backend died abnormally - postgresql 7.2.1-5 |
Previous Message | Chris Albertson | 2002-07-16 15:40:53 | Re: Pushing PostgreSQL to the Limit (urgent!) |