Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with passing dates
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00663365
Message ID:
00663959
Vues:
12
Hi Tom,

You must use parametrized SQL command:
pdDate=IIF(EMPTY(_Field_),.NULL.,_Field_)
?SQLEXEC(nHand,"INSERT INTO _Table_ (_Field_) VALUES (pdDate)")

or use "Date, Time, and Timestamp Escape Sequences"
if date is not .NULL.:

* YYYY-MM-DD
lcDate=DTOS(_Field_)
lcDate=LEFT(pcDate,4)+"-"+SUBS(lcDate,5,2)+"-"+RIGHT(lcDate,2)

lcSQL="INSERT INTO _Table_ (_Field_) VALUES ({d '"+lcDate+"'})"

?SQLEXEC(nHand,lcSQL)

Martin
"Navision is evil that needs to be erazed... to the ground"

Jabber: gorila@dione.zcu.cz
Jabber? Jabbim
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform