Having Problems Updating Records using ADO

Results 1 to 4 of 4

Thread: Having Problems Updating Records using ADO

  1. #1
    Join Date
    Dec 1969

    Default Having Problems Updating Records using ADO

    The Message I get is following:<BR>ADODB.Recordset error &#039 800a0bb9&#039 <BR><BR>The application is using arguments that are of the wrong type, are out of acceptable range, or are in conflict with one another. <BR><BR>/interwizard/newstep3.asp, line 64 <BR><BR>The Chunk of code is:<BR><BR>strSQL = "SELECT * FROM eProfessionals WHERE UserLogin = &#039" & myname & "&#039"<BR>rstemp.Open strSQL, connectme, _<BR> adOpenKeyset, adLockOptimistic<BR> <BR>&#039rstemp.Open strSQL, connectme, adLockOptimistic<BR> rstemp("FirstName") = FirstName<BR> rstemp("LastName") = LastName<BR> rstemp("MailAddress") = MailAddress<BR> rstemp("MailCity") = MailCity<BR> rstemp("MailState") = MailState<BR> rstemp("MailZip") = MailZip<BR> rstemp("HomePhone") = HomePhone<BR> rstemp("WorkPhone") = WorkPhone<BR> rstemp("FaxPhone") = FaxPhone<BR> rstemp("EmailAddress") = EmailAddress<BR> rstemp("Country") = Country<BR> rstemp.Update<BR><BR><BR><BR>&#039Reopen the recordset variable but this time for insertion into the DB<BR>&#039set rstemp = Nothing<BR>&#039Set rstemp = Server.CreateObject("ADODB.Connection")<BR>&#039rs temp.open connectme<BR>&#039rstemp.execute strSQL<BR>&#039rstemp.close<BR>&#039set rstemp = nothing<BR>%&#062;<BR><BR>I&#039m not real sure what it&#039s doing... Coincidentally the line number the error bombs out on is where the recordset is opened? Anyone have any ideas? I just need to be able to write multiple values from a form to an existing database record.<BR>Thanks!<BR>Cari

  2. #2
    Join Date
    Dec 1969

    Default RE: Having Problems Updating Records using ADO

    Hello ....<BR>I don&#039t know if i can help, but try this code for updating or adding to a database i&#039ve used it and it worked:<BR><BR> &#039 Automatic DataConnection<BR> Session("DataConn_ConnectionString") = _<BR> "DRIVER=Microsoft Access Driver (*.mdb);DBQ=" & Server.MapPath("STUDENT.mdb")<BR>&#039 End of Automatic DataConnection<BR> strconn = Session("DataConn_ConnectionString")<BR> set conn = server.createobject("adodb.connection")<BR> set RSStudent1 = server.createobject("adodb.recordset")<BR> conn.open strconn<BR> strsql = "UPDATE st_table SET Lesson = 1 , Section = 1 WHERE STUDENTID = " & session("studentid")<BR>RSStudent1.open strsql, conn<BR><BR> STUDENT is the name of my database<BR> st_table is the name of the table<BR><BR>and if you want to add information from a form to this table try this:<BR><BR>strsql = "insert into st_table (Name, E_mail," _<BR> & " Password) values (&#039" & Request.Form("Name") & "&#039, &#039" & _<BR> Request.Form("EmailAddress") & "&#039, &#039" & Request.Form("Password") & "&#039)"<BR>RSStudent2.open strsql, conn

  3. #3
    Willie Dude, Esq Guest

    Default RE: Having Problems Updating Records using ADO

    Make sure you have the ADO constant include file...<BR>&#060;!-- #INCLUDE FILE="adovbs.inc" --&#062;<BR>you can get a copy of it from alot of sites.. I&#039ve got it on mine...http://www.interwizard.com/adovbs.inc<BR>This should help though.. I bet you also got some Provider Not supported errors too eh?

  4. #4
    olivier Guest

    Default RE: Having Problems Updating Records using ADO

    I had the same problem. In my case the problem was that my connection string (in your case connectme) was not defined / opened. I would verify that connectme is opened properly.<BR>eg<BR>set connectme = server.createobject("ADODB.Connection")<BR>connect me.open "yourDSN"

Posting Permissions

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