By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,127 Members | 1,338 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,127 IT Pros & Developers. It's quick & easy.

ODBC creating nulls?

P: n/a

From: "Dan Perlman" <da*@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

Jul 19 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.