Re: Why this code fails - Mailing list pgsql-odbc

From Clemens Ladisch
Subject Re: Why this code fails
Date
Msg-id fe9b8ef0-1a60-4669-2417-459de0d6554f@ladisch.de
Whole thread Raw
In response to Why this code fails  (Igor Korot <ikorot01@gmail.com>)
List pgsql-odbc
Igor Korot wrote:
> Following code fails with the error "Invalid column nuber in DescribeCol".
>
>     std::wstring query = L"SHOW log_directory";
>     ret = SQLPrepare( m_hstmt, qry, SQL_NTS );
>     ret = SQLDescribeCol( m_hstmt, 1, columnName, 256, &columnNameLen, &columnDataType, &columnDataSize,
&columnDataDigits,&columnDataNullable );
 

So SQLNumResultCols() does not return the correct count, either?

I suspect the "Parse Statements" ODBC driver option is enabled.
Does it work if you disable that option, or if you call SQLExecute() before,
or if you use SQLExecDirect()?


Regards,
Clemens


pgsql-odbc by date:

Previous
From: Igor Korot
Date:
Subject: Why this code fails
Next
From: "Inoue, Hiroshi"
Date:
Subject: Re: Use of undocumented functions