Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - SQL Update error
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

SQL Update error

 Post Reply Post Reply
Author
ub3rl337ch3ch View Drop Down
Senior Member
Senior Member
Avatar

Joined: 16 February 2005
Location: Australia
Status: Offline
Points: 341
Post Options Post Options   Thanks (0) Thanks(0)   Quote ub3rl337ch3ch Quote  Post ReplyReply Direct Link To This Post Topic: SQL Update error
    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?
Back to Top
ub3rl337ch3ch View Drop Down
Senior Member
Senior Member
Avatar

Joined: 16 February 2005
Location: Australia
Status: Offline
Points: 341
Post Options Post Options   Thanks (0) Thanks(0)   Quote ub3rl337ch3ch Quote  Post ReplyReply Direct Link To This Post 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...
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.