Skip site navigation (1) Skip section navigation (2)

Re: SqlGetData problems

From: Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>
To: mmantyla(at)soberit(dot)hut(dot)fi
Cc: pgsql-odbc(at)postgresql(dot)org
Subject: Re: SqlGetData problems
Date: 2001-10-24 23:50:22
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-odbc
Mika M舅tylwrote:
> I have discovered two problems with SQLGetData. I have hacked my way
> around these problems, but the fixes are not very elegant ...
> 1)
> SqlGetData:
> The target column's type is SQL_LONGVARBINARY (other binary fields might
> do as well), and you try to get them as SQL_C_CHAR. This return the data
> in binary format, instead of ASCII characters as hexadecimal form
> (11111111 -> FF).

I will take care of this but I'm not sure when I could
do it.

> 2)
> SqlGetData:
> The target column's type is SQL_DATE or SQL_TIMESTAMP, and you try to
> get them as SQL_C_CHAR. This will cause successive calls to SQLGetData
> to return the same value repeatedly. This results non-ending loop in the
> following code, as value of got is constantly above zero. Note:
> st.GetData is wrapper around SQLGetData.
> while( (got=st.GetData( i, buf, sizeof(buf), SQL_C_CHAR ))>0 )
>         line.append( buf );

This seems easier to fix than fixing 1) and so I would
be able to fix it in the near future.

Hiroshi Inoue

In response to

pgsql-odbc by date

Next:From: Dado FeigenblattDate: 2001-10-26 17:30:25
Subject: PostgreSQL, JDBC, and Druid
Previous:From: Hiroshi InoueDate: 2001-10-24 23:47:28
Subject: Re: Writing BLOBS to pgsql via ODBC using VB

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group