>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.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao