Results 1 to 4 of 4

Thread: Connection String is fine until...

  1. #1

    Thread Starter
    Hyperactive Member PJB's Avatar
    Join Date
    Aug 2000
    Location
    dunno at the moment
    Posts
    302
    i password the database, here is the connection string:

    Code:
    Set Conn = Server.CreateObject("ADODB.Connection")
        Set RS = Server.CreateObject("ADODB.RecordSet")   
    
    DSNtemp="DRIVER={Microsoft Access Driver (*.mdb)};" 
        DSNtemp=dsntemp & "DBQ=" & server.mappath("../db/database.mdb")
        conn.Open DSNtemp, 1, 3
    can anybody point out where i should be putting the uid and pwd? I've tried just about everywhere in the string
    VB6.0 SP4
    Windows 2000
    I'm thinking of a number between

  2. #2
    Hyperactive Member Kagey's Avatar
    Join Date
    Sep 2000
    Location
    The Wilderness of New Brunswick
    Posts
    294
    just put ;pwd=PASSWORD; as in:
    Code:
    Set Conn = Server.CreateObject("ADODB.Connection")
        Set RS = Server.CreateObject("ADODB.RecordSet")   
    
    DSNtemp = "DRIVER={Microsoft Access Driver (*.mdb)};" 
        DSNtemp = DSNtemp & "DBQ=" & server.mappath("../db/database.mdb") & ";pwd=PASSWORD;"
        conn.Open DSNtemp, 1, 3

  3. #3

    Thread Starter
    Hyperactive Member PJB's Avatar
    Join Date
    Aug 2000
    Location
    dunno at the moment
    Posts
    302
    i put my password in the way you stated and it's still giving me this error:

    Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
    [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x58c Thread 0x674 DBC 0x161500c Jet'.



    it's an Access 2000 database and i'm using Windows 2000 pro
    VB6.0 SP4
    Windows 2000
    I'm thinking of a number between

  4. #4

    Thread Starter
    Hyperactive Member PJB's Avatar
    Join Date
    Aug 2000
    Location
    dunno at the moment
    Posts
    302
    thanx anyway, i got it working with a different connection string
    VB6.0 SP4
    Windows 2000
    I'm thinking of a number between

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