Code from a Scott Mitchell article

Results 1 to 2 of 2

Thread: Code from a Scott Mitchell article

  1. #1
    Join Date
    Dec 1969

    Default Code from a Scott Mitchell article

    I&#039;ve been fiddling with the code from the "searching" article<BR><BR>I&#039;ve placed the script in an asp page along with the necessary connection strings for my database.<BR><BR>There is a section outside the function where the database is "purged" and that works, so I know I&#039;m connecting. <BR><BR>Where I&#039;m having problems is adding new records to the database. I continue to get an error at the first record after the rs.AddNew command.<BR><BR>ie objRS.AddNew<BR> objRS("Title") = strTitle<BR>*************************<BR>Microsoft OLE DB Provider for ODBC Drivers error &#039;80040e21&#039; <BR><BR>Errors occurred <BR><BR>/training/buildindex.asp, line 56 <BR><BR>**************************<BR><BR>Has anyone examined this code. I&#039;d sure like to get it to work properly.<BR><BR>James<BR>

  2. #2
    Join Date
    Dec 1969

    Default debug!

    I would add a response.write before the addnew to see what values you are inserting into the fields. There might be an invalid character in the string causing the error....<BR><BR>response.write("Title:"&strTitle) <BR>objRS.AddNew<BR>objRS("Title") = strTitle<BR><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