Re: ODBC Error while selecting a numeric data field
От | Hiroshi Inoue |
---|---|
Тема | Re: ODBC Error while selecting a numeric data field |
Дата | |
Msg-id | EKEJJICOHDIEMGPNIFIJOEMEIGAA.Inoue@tpf.co.jp обсуждение исходный текст |
Ответ на | Re: ODBC Error while selecting a numeric data field ("Tom Ince" <tom.ince@netzero.net>) |
Список | 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
В списке pgsql-general по дате отправления: