recordset connexion pb

Results 1 to 2 of 2

Thread: recordset connexion pb

  1. #1
    thewz Guest

    Default recordset connexion pb

    here is the code (as in my book)<BR><BR>function addrub(newrub2, rub2)<BR> set objRS = Server.CreateObject("ADODB.Connection")<BR> objRS.Open "rubriques", objConn, , ,"adCmdTable"<BR> <BR> <BR>end function<BR>sub connect<BR> set objConn = Server.CreateObject("ADODB.Connection")<BR> objConn.ConnectionString = "DRIVER={Microsoft Access Driver (*.mdb)};" & "DBQ=" & Server.MapPath("clictout.mdb")& ""<BR> objConn.Open<BR>end sub<BR><BR>after having launch connect, i launch addrub, but i get this error message!??<BR><BR><BR>Microsoft VBScript runtime erreur &#039;800a01c2&#039; <BR><BR>Wrong number of arguments or invalid property assignment: &#039;objRS.Open&#039; <BR><BR>/clictout/tete.asp, ligne 8 <BR><BR><BR>thank you for your help!

  2. #2
    Join Date
    Dec 1969

    Default RE: recordset connexion pb

    You are creating objRS as an ADODB.Connection instead of an ADODB.Recordset, and the Open methods use different parameters, which is generating the problem

Posting Permissions

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