Insert with bound columns - Mailing list pgsql-odbc

From Andreas Pflug
Subject Insert with bound columns
Date
Msg-id 3E42AA74.9090606@web.de
Whole thread Raw
Responses Re: Insert with bound columns  (Andreas Pflug <Andreas.Pflug@web.de>)
List pgsql-odbc
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


pgsql-odbc by date:

Previous
From: "Support"
Date:
Subject: Repost: problem on treatment when add a duplicate primary key
Next
From: Nick Gorham
Date:
Subject: Re: unixODBC, PostgreSQL 7.3 + ODBC V3 drivers?