Results 1 to 2 of 2

Thread: Problems Connecting to A Database

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2000
    Posts
    4
    When I try connectin to a database using the following code:
    where = (server.mappath("..\data\data.mdb"))
    dsn = "driver={Microsoft Access Driver (*.mdb)};dbq="&where&"; pwd="
    Set Recordset = Server.CreateObject("ADODB.Recordset")
    Connection.Open DSN
    It brings back the following error message:

    Microsoft VBScript runtime error '800a01a8'
    Object required: ''

    Help me please!!!

  2. #2
    Guest

    Cool

    Try this...

    m_DB = Server.MapPath("/Web/ResearchTest/AdminLogin/Db/Login.mdb")
    strSQL = "SELECT * FROM tbl_Login"

    Set dbConn = Server.CreateObject("ADODB.Connection")
    dbConn.Provider = "Microsoft.Jet.OLEDB.4.0"
    dbConn.ConnectionString = "Data Source=" & m_DB
    dbConn.Open

    Set rsConn = Server.CreateObject("ADODB.Recordset")
    rsConn.Open strSQL, dbConn,1,3


    Regards,
    Mac

Posting Permissions

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



Click Here to Expand Forum to Full Width