From: | Clemens Ladisch <clemens(at)ladisch(dot)de> |
---|---|
To: | pgsql-odbc(at)lists(dot)postgresql(dot)org |
Subject: | Re: What is the problem with this code? |
Date: | 2018-10-19 07:04:31 |
Message-ID: | 33da99f0-c583-6a0f-65f7-12873df6e632@ladisch.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-odbc |
Igor Korot wrote:
> SQLWCHAR *qry1 = new SQLWCHAR[query1.length() + 2];
> memset( qry1, '\0', query1.length() + 2 );
memset expects the length to be in bytes.
> ret = SQLPrepare( m_hstmt, qry1, SQL_NTS );
> ret = SQLDescribeCol( m_hstmt, 1, columnName, 256, &columnNameLen, &columnDataType, &columnDataSize, &columnDataDigits, &columnDataNullable );
>
> The SQLDescribeCol() call fails with the error invalid column number".
Does SQLExecute work? Does SQLNumResultCols give 1?
The specification says "for performance reasons, an application should
not call SQLDescribeCol before executing a statement." But it should
work anyway; if not, this would be a bug. What are the settings of
"Parse Statements" and "Server side prepare" of the data source?
Regards,
Clemens
From | Date | Subject | |
---|---|---|---|
Next Message | Mehman Jafarov | 2018-10-19 09:03:12 | Problem about partitioned table |
Previous Message | Igor Korot | 2018-10-19 04:49:12 | What is the problem with this code? |
From | Date | Subject | |
---|---|---|---|
Next Message | Igor Korot | 2018-10-19 11:14:03 | Fwd: What is the problem with this code? |
Previous Message | Igor Korot | 2018-10-19 04:49:12 | What is the problem with this code? |