From: Andreas Pflug <Andreas.Pflug@web.de>
To: pgsql-odbc@postgresql.org
Subject: Insert with bound columns
Date: Thu, 06 Feb 2003 19:33:24 +0100
Message-ID: <3E42AA74.9090606@web.de> (raw)
Did anybody succeed in inserting empty string columns using bound columns?
INSERT INTO testtab (keyCol, strCol) VALUES (1, '') or (1, NULL)
succeeds, but
INSERT INTO testtab (keyCol, strCol) VALUES (?,?) does not.
I debugged the driver and found that SQLNumParams will return 2 for the
bound column version,which is obviously correct. Unfortunately, MSDASQL
seems to expect 1 (I checked by changing it with debugger), but that
will make the ODBC driver unhappy. I changed the database access class
to replace all empty strings with a one-space string. This made MSDASQL
happy, but will not be reasonable for production.
I'm using native OLEDB, thus MSDASQL is my provider using ODBC 7.2.5
from source.
Feedback from ADO users is welcome, they're using OLEDB implicitely.
I checked MSDN and Technet for this,and traced the output of PGadmin II
which is not using bound columns so it's not helpful to me.
Any hints?
Andreas
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-odbc@postgresql.org
Cc: Andreas.Pflug@web.de
Subject: Re: Insert with bound columns
In-Reply-To: <3E42AA74.9090606@web.de>
References: <3E42AA74.9090606@web.de>
* 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