Re: Why this code fails
Clemens Ladisch <[email protected]> Wed, 26 Sep 2018 09:47:41 +0200
| Newsgroups | gmane.comp.db.postgresql.odbc |
|---|---|
| Message-ID | <[email protected]> |
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