Re: Fwd: Problem retrieving data

From: Nick Gorham <nick(at)lurcherlink(dot)org>
To: Igor Korot <ikorot01(at)gmail(dot)com>, PostgreSQL ODBC list <pgsql-odbc(at)postgresql(dot)org>
Subject: Re: Fwd: Problem retrieving data
Date: 2026-11-15 13:19:51
Message-ID: f91b72e5-8d25-4593-9aa6-034cbc29cdd6@lurcherlink.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-odbc

On 15/11/2026 08:12, Igor Korot wrote:
> ret = SQLBindCol( m_hstmt, 1, SQL_C_WCHAR, &styleName, 33,
> &cbStyleName );

That should be

ret = SQLBindCol( m_hstmt, 1, SQL_C_WCHAR, &styleName, sizeof(styleName) ,&cbStyleName );

The buffer length argument is always the size of the buffer in bytes, not in characters (in this case).

In this case sizeof(styleName) will be 66, not 33;

--
Nick Gorham

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Marco Lechner 2026-11-16 14:22:29 404 when trying to update Postgresql-Server
Previous Message Kouame Narcisse Koffi 2026-11-15 12:34:46 Re: Problem retrieving data

Browse pgsql-odbc by date

  From Date Subject
Previous Message Kouame Narcisse Koffi 2026-11-15 12:34:46 Re: Problem retrieving data