Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using SQLEXEC with ACCESS and blank dates ???
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Using SQLEXEC with ACCESS and blank dates ???
Divers
Thread ID:
00872515
Message ID:
00872515
Vues:
59
THE CHALLENGE: I have to insert records from a VFP table to an Access MDB.
THE SOLUTION: Use a DSN to Access and SQLEXEC !!

Not quite, I am having the following issue.

DSN name is "INFORM"

cnHandle = SQLCONNECT("INFORM")
lDate = {01/01/04}
crun = SQLEXEC(cnHandle,"INSERT INTO MyTable (DateOfBirth) VALUES('" ;
+ lDate + "')")
? crun provides a 1 which means the SQLEXEC actually worked and it succesfuly inserted a record into Access MDB.

BUT IF I DO THE FOLLOWING:

cnHandle = SQLCONNECT("INFORM")
lDate = { / / }
crun = SQLEXEC(cnHandle,"INSERT INTO MyTable (DateOfBirth) VALUES('" ;
+ lDate + "')")
? crun provides a -1 which means the SQLEXEC didn't work !

I do have blank date fields in the records I need to exprt to the Access table.

I have larady tried tons of ocmbinations usinf DTOC() and CTOD() and other ideas but to no avail...

Abyvody has ANY ideas ?

thanks !
____________________________
Luis Perez
Millennium Data Solutions, Corp.
President & CEO
e-mail: luis@mds-corp.com
http://www.mds-corp.com
USA
____________________________
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform