db connection

Results 1 to 2 of 2

Thread: db connection

  1. #1
    HG User Guest

    Default db connection

    I have the following code to create a recordset object ...<BR><BR>&#039;open a connection&#039;<BR>Dim objConn3<BR>Set objConn3 = Server.CreateObject("ADODB.Connection")<BR>objConn 3.ConnectionString="DRIVER={Microsoft Access Driver (*.mdb)};"&"DBQ=D:InetpubPlantsDBPlantsDB.mdb"<BR> objconn3.Open <BR><BR>strQuery= "SELECT * FROM data WHERE data.current = " & strName<BR>Dim objToggle<BR>Set objToggle = Server.CreateObject("ADODB.Recordset")<BR>objToggl e.Open strQuery, objConn3<BR><BR>but I get the error : <BR>Microsoft OLE DB Provider for ODBC Drivers error &#039;80040e10&#039; <BR>[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1. <BR>/PlantsDB/addSession.asp, line 34 <BR><BR>I just copied this code (though changed the name objconn1 to objconn3) from another page where it does work. <BR><BR>Any ideas ?

  2. #2
    HG User Guest

    Default found error


Posting Permissions

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