Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL INSERT
Message
 
 
To
22/03/2000 09:38:08
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00348848
Message ID:
00348859
Views:
19
>Well, today I seem to have problems inserting a date variable
>Here is an example:
>
>fyr =cursor.fyr $&& string
>ldDate = cursor.Sdate && datetime data type
>
>cSQL="INSERT INTO Transbud (fyr, Sdate )"
>cSQL=cSQL + " VALUES ('"+lcfyr+"',"+ALLT(STR(ldDate))+")"
>
>what am I missing here?
STR() doesn't work on Date values. You have to use DTOC() or TRANSFORM() for this. Also, VFP will throw an error if SET STRICTDATE is anything other than 0 when you use these functions.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform