I want to use an SQL update statement that looks like this (i've not included a where clause but usually would):
This returns an error:
ALIAS "txtfirstname" is not found
Now if I create this as a string and run it using this code it will work.
Now I understand the statement that errors contains text and so should be qualified by quotes but adding them to original statement makes no difference.
I was wondering if there is anyway to do these sorts of queries without building a string?
Thanks,
Mark
Mark Davies
Warwickshire County Council
Code:
UPDATE table1 SET cfirstname = thisform.txtfirstname.value
This returns an error:
ALIAS "txtfirstname" is not found
Now if I create this as a string and run it using this code it will work.
Code:
csql = "UPDATE table1 SET cfirstname ='" + thisform.txtfirstname.value + "'"
&csql
Now I understand the statement that errors contains text and so should be qualified by quotes but adding them to original statement makes no difference.
I was wondering if there is anyway to do these sorts of queries without building a string?
Thanks,
Mark
Mark Davies
Warwickshire County Council