Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ODBC creating nulls?

0 views
Skip to first unread message

Dan Perlman

unread,
Jul 9, 2004, 6:22:15 PM7/9/04
to

From: "Dan Perlman" <d...@dpci.NOSPAM.us>
Subject: ODBC creating nulls?
Date: Friday, July 09, 2004 10:43 AM

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

0 new messages