X-Original-To: pgsql-odbc@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 1D9294758E1 for ; Thu, 6 Feb 2003 13:33:26 -0500 (EST) Received: from smtp.web.de (smtp03.web.de [217.72.192.158]) by postgresql.org (Postfix) with ESMTP id A4571475458 for ; Thu, 6 Feb 2003 13:33:24 -0500 (EST) Received: from p508189c6.dip0.t-ipconnect.de ([80.129.137.198] helo=web.de) by smtp.web.de with asmtp (WEB.DE(Exim) 4.93 #1) id 18gqpv-0004T3-00 for pgsql-odbc@postgresql.org; Thu, 06 Feb 2003 19:33:24 +0100 Message-ID: <3E42AA74.9090606@web.de> Date: Thu, 06 Feb 2003 19:33:24 +0100 From: Andreas Pflug User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3a) Gecko/20021212 X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-odbc@postgresql.org Subject: Insert with bound columns Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200302/31 X-Sequence-Number: 2649 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