Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Senior Coder Mhtml's Avatar
    Join Date
    Jun 2002
    Location
    Sydney, Australia
    Posts
    3,531
    Thanks
    0
    Thanked 1 Time in 1 Post

    Post odbc problem..dsn-less

    Ok, I've been to http://www.4guysfromrolla.com and I followed the instructions there for learning how to do a dsn-less connection to a access db. But I didn't get it to work. here's the script:

    Code:
    <%
    Dim objConn
    Set objConn = Server.CreateObject("ADODB.Connection")
    objConn.ConnectionString = "DBQ=C:\inetpub\wwwroot\cube\db\main.mdb;DRIVER={MS Access (*.mdb)}" 
    objConn.Open 
    %>
    Followed by the html tags.
    Also once I have got my db open how do I get & send information?
    Omnis mico antequam dominus Spookster!

  • #2
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    10,960
    Thanks
    0
    Thanked 236 Times in 233 Posts

    Re: odbc problem..dsn-less

    objConn.ConnectionString = "DBQ="&server.mappath("db/main.mdb") & ";DRIVER={MS Access (*.mdb)}"


    Originally posted by Mhtml
    Ok, I've been to http://www.4guysfromrolla.com and I followed the instructions there for learning how to do a dsn-less connection to a access db. But I didn't get it to work. here's the script:

    Code:
    <%
    Dim objConn
    Set objConn = Server.CreateObject("ADODB.Connection")
    objConn.ConnectionString = "DBQ=C:\inetpub\wwwroot\cube\db\main.mdb;DRIVER={MS Access (*.mdb)}" 
    objConn.Open 
    %>
    Followed by the html tags.
    Also once I have got my db open how do I get & send information?

  • #3
    Senior Coder Mhtml's Avatar
    Join Date
    Jun 2002
    Location
    Sydney, Australia
    Posts
    3,531
    Thanks
    0
    Thanked 1 Time in 1 Post
    ok, I got this error. I'm not quite sure what I'm doing but I believe that I need to acces jet or something, my version is Microsoft.Jet.OLEDB.4.0
    Code:
    Microsoft OLE DB Provider for ODBC Drivers error '80004005' 
    
    [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified 
    
    /db.asp, line 5
    Omnis mico antequam dominus Spookster!

  • #4
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    10,960
    Thanks
    0
    Thanked 236 Times in 233 Posts
    try:

    objConn.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.Mappath("db/main.mdb") & ";"

    Originally posted by Mhtml
    ok, I got this error. I'm not quite sure what I'm doing but I believe that I need to acces jet or something, my version is Microsoft.Jet.OLEDB.4.0
    Code:
    Microsoft OLE DB Provider for ODBC Drivers error '80004005' 
    
    [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified 
    
    /db.asp, line 5

  • #5
    Senior Coder Mhtml's Avatar
    Join Date
    Jun 2002
    Location
    Sydney, Australia
    Posts
    3,531
    Thanks
    0
    Thanked 1 Time in 1 Post
    Success! Thanks Glenn,
    Omnis mico antequam dominus Spookster!


  •  

    Posting Permissions

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