Addnew Method with ADO

Results 1 to 2 of 2

Thread: Addnew Method with ADO

  1. #1
    Vipul Desai Guest

    Default Addnew Method with ADO

    I need to add records to an Access Table and I am having an error that states that the Provider does not support this method immediately after the RS.addnew command. My code is below and could someone please help. It is urgent!<BR><BR>&#060;%@EnableSessionState=True Language=VBScript%&#062; <BR>&#060;HTML&#062;<BR>&#060;BODY bgColor=CLAY&#062;<BR>&#060;% Call AddLogisticsNumbers %&#062;<BR><BR><BR><BR>&#060;% Sub AddLogisticsNumbers<BR><BR>Dim ADOConn<BR>Dim Daoconn<BR><BR>dIM RS<BR>dim count<BR>Set ADOCOnn = CreateObject("Adodb.Connection") <BR>Set RS = CreateObject("ADODB.REcordSEt") &#039<BR>AdoConn.Open "Provider = Microsoft.Jet.OLEDB.4.0;Data Source=c est.MDB" <BR><BR>RS.Open "collapsed",adoConn,adOpenDynamic<BR><BR>count = 0 <BR>Do while not RS.eof<BR> RS.Move 1<BR> count = count + 1<BR>Loop <BR><BR>RS.AddNew<BR>Response.Err Description &#039Program Crashes Here.<BR><BR><BR><BR><BR><BR>End Sub<BR>%&#062;<BR>&#060;p&#062;<BR>&#060;/HEAD&#062;<BR>&#060;/BODY&#062; <BR>&#060;/HTML&#062;<BR><BR>

  2. #2
    Join Date
    Dec 1969
    Posts
    40

    Default RE: Addnew Method with ADO

    Dim ADOConn<BR>Dim Daoconn<BR><BR>dIM RS<BR>dim count<BR>Set ADOCOnn = CreateObject("Adodb.Connection") <BR>Set RS = CreateObject("ADODB.REcordSEt") &#039<BR>AdoConn.Open "Provider = Microsoft.Jet.OLEDB.4.0;Data Source=c est.MDB" <BR><BR>RS.Open "collapsed",adoConn,adOpenDynamic<BR><BR>&#039 Skip the code below and replace with....<BR>&#039count = 0 <BR>&#039Do while not RS.eof<BR>&#039RS.Move 1<BR>&#039count = count + 1<BR>&#039Loop <BR>count = RS.RecordCount<BR><BR>RS("FldName1") = "bla bla bla..."<BR>RS("FldName1") = "wow wowow wow..."<BR>RS.AddNew<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
  •