Print Page | Close Window

SQL Update error

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=14180
Printed Date: 30 March 2026 at 8:35am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: SQL Update error
Posted By: ub3rl337ch3ch
Subject: SQL Update error
Date Posted: 09 March 2005 at 10:21pm
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?



Replies:
Posted By: ub3rl337ch3ch
Date Posted: 10 March 2005 at 12:29am
oh well, i'm stupid... i spelled update wrong... its that damn first and lsat lrettes tihng... Ignore me... continue about your business...



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net