Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with passing dates
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00663365
Message ID:
00663959
Views:
13
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
Previous
Reply
Map
View

Click here to load this message in the networking platform