UPDATE statement error

Results 1 to 2 of 2

Thread: UPDATE statement error

  1. #1
    Join Date
    Dec 1969

    Default UPDATE statement error

    hi,<BR><BR>I have a problem updating a a particular column in a table ,while <BR>there is no problem updating a different column in same table.<BR><BR>here&#039s the code:<BR><BR>s1="update details set desc=&#039cgtdeegtrytu&#039 where id=&#039n010&#039"<BR>conn.execute(s1)<BR><BR>desc is a text column,without any validations,size=100 in MSAccess DATABASE.<BR>there is a row with this id.<BR><BR>ERROR STATEMENT:<BR>Microsoft OLE DB Provider for ODBC Drivers error &#039 80040e14&#039 <BR><BR>[Microsoft][ODBC Microsoft Access 97 Driver] Syntax error in UPDATE statement. <BR><BR>NO ERRORS FOR THIS STATEMENT:<BR><BR>s1="update details set name=&#039meena&#039 where id=&#039n010&#039"<BR>conn.execute(s1)<BR><BR>name is another column.<BR><BR><BR>please help.<BR><BR>

  2. #2
    Jairo Guest

    Default RE: UPDATE statement error

    Archna,<BR>My guess would be that desc is a keyword and is screwing up the way MS-Access is interpreting it.<BR><BR>Two choices comes to mind:<BR>1. Change your field name "desc" to something else like "description".<BR>2. Enclose your field name with [].<BR> i.e. s1 = "update details set [desc]=&#039cgtdeegtrytu&#039 where id=&#039n010&#039"<BR><BR>HTH,<BR>Jairo<BR>http://www.citywebarchitects.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts