INSERT INTO... error?!

Results 1 to 2 of 2

Thread: INSERT INTO... error?!

  1. #1
    Join Date
    Dec 1969

    Default INSERT INTO... error?!

    ok... I have a weird error here.<BR><BR>Here is my code.<BR><BR>Set rsSale = Server.CreateObject("ADODB.Recordset")<BR>rsSale.O pen "Sale", db, adOpenForwardOnly,adLockOptimistic,adCmdTable<BR>r sSale.AddNew<BR>rsSale("Date") = Now()<BR>&#039<BR>&#039other fields filled in....<BR>&#039<BR>rsSale("Total") = "$100.00"<BR>rsSale.Update <BR>rsSale.Close<BR>Set rsSale = Nothing<BR><BR>When I run it I get the message below... the line <BR>number referrs to the "rsSale.Update" line... <BR><BR>Microsoft OLE DB Provider for ODBC Drivers error &#039 80004005&#039 <BR><BR>[Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement. <BR><BR>/Test/rightFrame/siteAdmin/makeSale.asp, line 87 <BR><BR>all the fields are being filled in with the right type of data and everything else seems fine... I do almost the same thing<BR>like 4 other times in the file... I dont know why it has a problem with this code.<BR><BR>Thanks in advance.... you guys are a big help for us beginners.<BR>John

  2. #2
    Jason Miller Guest

    Default RE: INSERT INTO... error?!

    It&#039s been a long time since I&#039ve altered a Recordset like that, but if it&#039s giving you an error on the .Update, start narrowing down what&#039s going wrong by commenting out fields and pushing your .Update statement up. For example, if Total is supposed to be an integer, then commenting it out and moving the .Update above that line will solve your problems (and thus tell you exactly where they are in your code).<BR><BR>HiH<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