Actually, it's:
objConn1.Open "ConnectionString"
So this would override the .ConnectionString property set before.
A valid connection string is:
strConn = "Provider=Microsoft.Jet.OL
Hence, either state,
objConn1.ConnectionString = strConn
objConn1.Open
or,
objConn1.Open strConn
Main Topics
Browse All Topics





by: fritz_the_blankPosted on 2002-09-02 at 12:33:04ID: 7256987
This is what I use:
.mdb") eObject("A DODB.Conne ction") EDB.4.0;"_ meout = 15 ut = 10
e/DB.mdb")
strDataPath = server.MapPath("accessdata
set objConnection=Server.Creat
strConnectString = "Provider=Microsoft.Jet.OL
+ " Data Source= " & strDataPath & ";"_
+ " Mode=Share Deny None;User Id=admin;PASSWORD=;"
objConnection.ConnectionTi
objConnection.CommandTimeo
objConnection.Mode = 3 'adModeReadWrite
if objConnection.state = 0 then
objConnection.Open strConnectString
end if
A few things to check:
Are you using an include file to hold your connection script? If so, try the page without using includes first, i.e. paste the code into the page proper. That will remove one variable.
Are you certain that the IUSR account has Read/Write permissions to the directory that holds the database?
Are you certain that the database is not open in Access? Sometimes if you have a table open in design view, you can run into grief.
Instead of using MapPath, try putting the complete string in for the path. If that works, we can adjust your syntax there, i.e. server.mappath("../Databas
Fritz the Blank