I'm trying to change an existing record in an sql database so that the field PropNo equals the field fmPropNo, which is a unique autonumber. radio is a radio button used in a form to determine which record is to be changed. I've tried varying the delimiters to account for possible problems with data type, but that doesn't seem to do anything.
The offending code is:
radio = Request.Form("radio")
sql = "SELECT fmPropNo FROM BRProp WHERE PropNo=" & radio vrec.open sql, adoCon
fpropno = vrec("fmPropNo")
sql = "UPADTE BRProp SET BRProp.PropNo = " & fpropno & " WHERE BRProp.PropNo = " & radio
adoCon.Execute sql
and i get the followng error on the bottom line there
Microsoft OLE DB Provider for SQL Server (0x80040E14)
Line 1: Incorrect syntax near '.'
When I change the update line to be:
sql = "UPADTE BRProp SET PropNo = " & fpropno & " WHERE BRProp.PropNo = " & radio
i get the following error
Microsoft OLE DB Provider for SQL Server (0x80040E14)
Line 1: Incorrect syntax near '='.
Any ideas?