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