Results 1 to 3 of 3

Thread: Connecting to Access 2000 with ASP.

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 1999
    Posts
    93

    Connecting to Access 2000 with ASP.

    I use this code to connect to Access 97 but when I update the DB to 2000 it won't work.

    dim Database, Query
    set Database = server.createobject("ADODB.Connection")
    Database.ConnectionString = "DRIVER={Microsoft Access Driver (*.mdb)};" & "DBQ=" & Server.MapPath("Database\Knowledgebase.mdb")
    Database.Open

    Can someone give me the command to connect to 2000.

    Thanks
    Brandon

  2. #2
    Hyperactive Member PJB's Avatar
    Join Date
    Aug 2000
    Location
    dunno at the moment
    Posts
    302
    not really sure what's wrong with the way your doing it, seems like that should work, maybe try this:

    Code:
    Set Conn = Server.CreateObject("ADODB.Connection")
    
    DSNtemp="DRIVER={Microsoft Access Driver (*.mdb)}; "
        DSNtemp=dsntemp & "DBQ=" & server.mappath("Database\Knowledgebase.mdb") 
        conn.Open DSNtemp
    does your string give you any sort of error?
    VB6.0 SP4
    Windows 2000
    I'm thinking of a number between

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Sep 1999
    Posts
    93
    Sorry it was one of those thing that you do once and it doesn't work and you do again and it works. It was my first day doing asp. Sorry. It works fine now.

    Brandon

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