Re: ODBC : SQLGetData question
| От | Dev Kumkar |
|---|---|
| Тема | Re: ODBC : SQLGetData question |
| Дата | |
| Msg-id | CALSLE1MSthQPLGdKDPC9cTozFSqWDzBeZtz6VnavY-Xjik6fGw@mail.gmail.com обсуждение исходный текст |
| Ответ на | Re: ODBC : SQLGetData question (Dev Kumkar <devdas.kumkar@gmail.com>) |
| Ответы |
Re: ODBC : SQLGetData question
Re: ODBC : SQLGetData question |
| Список | pgsql-odbc |
On Wed, May 14, 2014 at 12:51 PM, Dev Kumkar <devdas.kumkar@gmail.com> wrote:
On Wed, May 14, 2014 at 12:10 PM, aihtdikh <aihtdikh@gmail.com> wrote:Hi,
SQLGetData expects the buffer length parameter to be a SQLLEN variable, which is a signed type.
SQL_NULL_DATA is defined as -1, which is 4294967295 if you interpret it as an unsigned type.
Your my_buff_len variable is being set to SQL_NULL_DATA correctly, but you are looking at it wrong.
Change it to be the correct type, and it will work as you expect.
Regards,
Harun
Thanks for the reply.
my_buff_len is defined as SQLLEN
SQLLEN my_buff_len;
SQLGetData(my_stmt, my_col_no, SQL_C_CHAR, &my_max_len, 0, &my_buff_len)if (my_buff_len == SQL_NULL_DATA)
{// Doesn't come here}What is being missed above?Regards...
if ((int)my_buff_len == SQL_NULL_DATA)
{
// will come here
} The above casting solves the problem, please review?
Regards...
Regards...
В списке pgsql-odbc по дате отправления: