Updating Problem!!

Results 1 to 2 of 2

Thread: Updating Problem!!

  1. #1
    Join Date
    Dec 1969

    Default Updating Problem!!

    Im trying to create a page where you edit information from a table and then update the table in db (Access).. but I keep getting this error msg.. <BR><BR>[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 2. <BR><BR>Here is the code im using to do all this..<BR><BR>set c = server.createobject("adodb.connection")<BR>c.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("Sites.mdb")<BR>set rs = server.createobject("adodb.recordset")<BR> <BR>sql = "UPDATE tblDeviceRanges SET Location=" & ccc_Location & ", Type=" & ccc_OldDeviceType & " WHERE Type= &#039;" & ccc_OldDeviceType & "&#039;" <BR> <BR>rs.Open sql, c, adOpenDynamic, adLockOptimistic<BR> <BR>rs.close : c.close : set rs = nothing : set c = nothing

  2. #2
    Join Date
    Dec 1969

    Default RE: Updating Problem!!

    http://www.aspfaqs.com/aspfaqs/ShowFAQ.asp?FAQID=58<BR><BR>try putting square brackets around *type* <BR><BR>also delimiting *ccc_OldDeviceType* with single quotes (if type is a string) might help<BR>

Posting Permissions

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