ODBC creating nulls?

From: "Dan Perlman" <dan(at)dpci(dot)NOSPAM(dot)us>
To: pgsql-general(at)postgresql(dot)org
Subject: ODBC creating nulls?
Date: 2004-07-09 16:43:39
Message-ID: %WzHc.10086$R36.4086@newsread2.news.pas.earthlink.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

Below is my VB6 code that writes data from an Access 2000 table to a PG
table.

The " & "" " on the right of each line should prevent nulls from being
passed to PG.
For some reason I still get nulls in any field without data. Even the
secondary part number which is set to "".

I had a system crash and had to reload a lot os stuff including the PG ODBC
driver.

Is there some setting in the DSN that I need to change?

DataPG.Recordset.AddNew
DataPG.Recordset("pricebookid") = MaxID & ""
DataPG.Recordset("partnumber") = Apb("partnumber") & ""
DataPG.Recordset("secondarypartnumber") = ""
DataPG.Recordset("grouping") = ""
DataPG.Recordset("Description") = Apb("Description") & ""
DataPG.Recordset("suppliercode") = Apb("suppliercode") & ""
DataPG.Recordset("categorycode") = Apb("categorycode") & ""
DataPG.Recordset("orderunit") = Apb("orderunit") & ""
DataPG.Recordset("pkgunitquantity") = Apb("pkgunitquantity") & ""
DataPG.Recordset("orderqty") = Apb("orderqty") & ""
DataPG.Recordset("movementcode") = Apb("movementcode") & ""
DataPG.Recordset("supersededto") = Apb("supersededto") & ""
DataPG.Recordset("cost") = Apb("cost") & ""
DataPG.Recordset("retail") = Apb("retail") & ""
DataPG.Recordset("dtstamp") = "6/8/2004"
DataPG.Recordset("upccode") = ""
MaxID = MaxID + 1
DataPG.Recordset.Update

Any help would be greatly appreciated.

Thanks,

Dan

Browse pgsql-general by date

  From Date Subject
Next Message Peter Eisentraut 2004-07-09 16:47:04 Re: Training and certification
Previous Message Bruce Momjian 2004-07-09 15:15:41 Re: PG vs MySQL