From: Mihail Popov <mi1919@tut.by>
To: pgsql-bugs@postgresql.org
Subject: BUG #5949: ODBC driver. Binding Arrays of Parameters
Date: Fri, 25 Mar 2011 13:35:08 GMT
Message-ID: <201103251335.p2PDZ8iR051758@wwwmaster.postgresql.org> (raw)
The following bug has been logged online:
Bug reference: 5949
Logged by: Mihail Popov
Email address: mi1919@tut.by
PostgreSQL version: 9.3
Operating system: windows 7
Description: ODBC driver. Binding Arrays of Parameters
Details:
Using ODBC, I encountered an error.
I used the ODBC API to insert an array of records.
Example:
unsigned long r = 5;
SQLSetStmtAttr(stmt, SQL_ATTR_PARAM_BIND_TYPE, SQL_PARAM_BIND_BY_COLUMN,
0);
SQLSetStmtAttr(stmt, SQL_ATTR_PARAMSET_SIZE, &r, 0);
….
// Bind the parameters in column-wise fashion.
SQLBindParameter(…)
…
When you run the error occurred.
SQLExecDirect(hstmt, Statement, SQL_NTS);
Errors are detected in the implementation of SQLSetStmtAttr in the ODBC
driver. Coming PGAPI_SetStmtAttr (HSTMT StatementHandle, SQLINTEGER
Attribute, PTR Value, SQLINTEGER StringLength) in pgapi30.c
For SQL_ATTR_PARAMSET_SIZE transformation
SC_get_APDF (stmt) -> paramset_size = CAST_UPTR2 (SQLUINTEGER SQLINTEGER,
Value);
led to the fact that paramset_size not equal to 5 and the number of memory
address that contains the variable r.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: mi1919@tut.by
Subject: Re: BUG #5949: ODBC driver. Binding Arrays of Parameters
In-Reply-To: <201103251335.p2PDZ8iR051758@wwwmaster.postgresql.org>
References: <201103251335.p2PDZ8iR051758@wwwmaster.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox