AndrewMozley
Programmer
I have an external database (in fact a NySQL database) to which I have established a connection with handle zhandle.
I would like to call SQLEXEC() from the VFP program to update a field Lastdate in table Mytable, record with ID 123. ID is the primary index.
The date which I wish to write to this field in Mytable is held in variable lcLastDate. I realise that this variable is not visible once the engine which interprets the SQLEXEC() command is doing its thing.
Would I need to have instructions something like this :
LOCAL lCommand
lCommand = "UPDATE MyTable SET Lastdate = " + ;
< some instruction to convert lcLastdate into a suitable character string > ;
WHERE Id = 123"
lnResult = SQLEXEC(zHandle, lCommand)
. . . . test to see if this update was successful.
I would be grateful to know what command I should use.
I would like to call SQLEXEC() from the VFP program to update a field Lastdate in table Mytable, record with ID 123. ID is the primary index.
The date which I wish to write to this field in Mytable is held in variable lcLastDate. I realise that this variable is not visible once the engine which interprets the SQLEXEC() command is doing its thing.
Would I need to have instructions something like this :
LOCAL lCommand
lCommand = "UPDATE MyTable SET Lastdate = " + ;
< some instruction to convert lcLastdate into a suitable character string > ;
WHERE Id = 123"
lnResult = SQLEXEC(zHandle, lCommand)
. . . . test to see if this update was successful.
I would be grateful to know what command I should use.