Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Pass through and Access... 1

Status
Not open for further replies.

Neil Toulouse

Programmer
Mar 18, 2002
882
GB
Hi there!

I am trying to insert data into an Access table from Visual FoxPro via ODBC.

I need to insert a blank date.

I insert a date with:

SQLEXEC( lnHandle, "INSERT INTO MyTable ( DateField ) VALUES ( '09/05/2003' )" )

which works fine, so I assumed to insert a blank one would be:

SQLEXEC( lnHandle, "INSERT INTO MyTable ( DateField ) VALUES ( '' )" )

which doesn't work! I am getting the ODBC error 'Data type mismatch in criteria expression.'

Any ideas? I have also posted this in the VFP forum.

TIA
Neil

"I like work. It fascinates me. I can sit and look at it for hours..."
 
SQLEXEC( lnHandle, "INSERT INTO MyTable ( DateField ) VALUES ( NULL )" )
 
Cheers dude!

Neil

"I like work. It fascinates me. I can sit and look at it for hours..."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top