Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP & SQL Server: Dates
Message
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00402704
Message ID:
00402746
Views:
9
Hi Ricardo,

First, if you call SQLExec from the same procedure (ie ldDatePay is still in scope when SQLExec is run), try this:

lcInstruction = "Update clients set date_payment = ?ldDatePay where codCli = ....."

SQLExec will understand that it has to insert the value of ldDatePay there.

Next, here's something that seems to work on my side, so you might want to give it a try:

lcInstruction = "Update clients set date_payment = '" + ;
DTOS(ldDatePay) + " " + TTOC(ldDatePay, 2) + "' where codCli = ..."


Hope this helps!



>Hi all,
>
>The question i have is:
>When i'm creating a string to use at a SQLEXEC(), i'm having a problem with dates, because SQL Server receives it from another format. Imagine this code:
>
>lcInstruction = "Update clients set date_payment = '" + ttoc(ldDatePay) + "' where codCli = ....."
Sylvain Demers
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform