insert nulls into foxpro tables using visual foxpro driver 
Author Message
 insert nulls into foxpro tables using visual foxpro driver

The documents of visual foxpro driver say it can support
Foxpro tables, so I export some tables(.dbf files) and
using visual foxpro driver to connect them using free
table format. Then...all the columns in the tables are
turned to NOT NULL, I try to insert null values into these
tables by modify the connection string and set "NULL=NO",
the msdn documents say this will insert blanks for null
values. So it does, it turns null numbers to zero, and
null date value to 12-30-99, this is not acceptable. Can
anybody tell me how to correct this and set the columns to
NULL?


Tue, 04 Oct 2005 18:03:51 GMT
 insert nulls into foxpro tables using visual foxpro driver



Quote:
> The documents of visual foxpro driver say it can support
> Foxpro tables, so I export some tables(.dbf files) and
> using visual foxpro driver to connect them using free
> table format. Then...all the columns in the tables are
> turned to NOT NULL, I try to insert null values into these
> tables by modify the connection string and set "NULL=NO",
> the msdn documents say this will insert blanks for null
> values. So it does, it turns null numbers to zero, and
> null date value to 12-30-99, this is not acceptable. Can
> anybody tell me how to correct this and set the columns to
> NULL?

Hi Andy,

FoxPro has more than one table format, and the Visual FoxPro ODBC driver
will support both formats.

The older FoxPro for DOS/Windows table format does not support nulls and you
will get the behavior you described if you try to insert them. The newer
Visual FoxPro table format accepts nulls.

If the tables are in the FPW format and need to be shared by an older
application that requires them to be in this format then you will have no
ability to work with nulls. If the tables don't need to be shared I think
you could create new tables (that will be in the VFP format) and move all
the data to them.

--
Cindy Winegarden  MCSD, Microsoft Visual FoxPro MVP

http://msdn.microsoft.com/vfoxpro  http://foxcentral.net



Tue, 04 Oct 2005 21:55:42 GMT
 
 [ 2 post ] 

 Relevant Pages 

1. How to Save data in Foxpro 2.6 using Visual Foxpro Driver (ADO)

2. Microsoft Visual FoxPro Driver and FoxPro 2.0

3. Microsoft Visual FoxPro Driver ocassionally hangs on reads or inserts

4. Unable to connect using Visual FoxPro driver when quote is in path

5. Using Aggregate Functions With MDAC 2.5, The Visual FoxPro Driver and VB6 Service pack 4

6. Visual FoxPro ODBC driver used in MS Access 97 app

7. Need help creating Fox 2.5 table via MS Visual FoxPro ODBC driver

8. 16-bit ODBC Driver for Visual FoxPro Tables

9. Need help creating Fox 2.5 table via MS Visual FoxPro ODBC driver

10. Cannot create Visual FoxPro table using ADO

11. One to many table reports using Visual Foxpro

12. DSNLess connection to Visual FoxPro table from Access 2000 using VB


 
Powered by phpBB® Forum Software