Re: Why SQLBindCol can not get back the c string length.

From: "Hu, Ming (Ivan)" <huming(at)lucent(dot)com>
To: Ludek Finstrle <luf(at)pzkagis(dot)cz>, "Hu, Ming (Ivan)" <huming(at)lucent(dot)com>
Cc: pgsql-odbc(at)postgresql(dot)org
Subject: Re: Why SQLBindCol can not get back the c string length.
Date: 2006-07-24 10:48:49
Message-ID: 31C0F08B0D18D511ACC800508BAE7B4714581BC4@ci0026exch001u.bj.lucent.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc


Thanks for your response.

I mean after calling SQLFetch(), the value could not be gotten.

-----Original Message-----
From: Ludek Finstrle [mailto:luf(at)pzkagis(dot)cz]
Sent: Monday, July 24, 2006 5:07 PM
To: Hu, Ming (Ivan)
Cc: pgsql-odbc(at)postgresql(dot)org
Subject: Re: [ODBC] Why SQLBindCol can not get back the c string length.

> Why I can not get the actual length from StrLen_or_IndPtr,the last
paramter
> of SQLBindCol(). The value of it always keep the input one.

When you want to get the value? You can't get it after SQLBindCol() call.
Please read the specification at:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odbc/htm/od
bcsqlbindcol.asp

If I misunderstand your notice please correct me.

> Also, for varchar string, the return c string is with right length, while
> for fixed chars in DB, the returned c string is
> always with the fixed char length in DB, there are space appended in c
> string.

I see you have no clue what's the difference betwwen char and varchar
type in PostgreSQL. Please read the PostgreSQL manual. It isn't ODBC
related (http://www.postgresql.org/docs).

Regards,

Luf

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message noreply 2006-07-24 10:49:16 [ psqlodbc-Bugs-1000681 ] Error when using ODBC driver with Microsoft Access
Previous Message noreply 2006-07-24 10:44:00 [ psqlodbc-Bugs-1000687 ] Problem with WHERE and upercase character