Hello georgev
Thanks for your post.
Sorry for not being clearer.
OK, my server likes scripts which connect to the MS Access databases it holds to look like this:
Code:
<%
Dim conn
set conn=Server.CreateObject("ADODB.Connection")
conn.Open "driver={Microsoft Access Driver (*.mdb)};DBQ=D:\business\login.mdb;"
%>
There is nothing here of related to Server.MapPath or Microsoft.Jet.OLEDB.4.0for instance.
This is a bit of a problem because the script I have to connect to a MS Access database does use these, as in:
Code:
<%
Set adoCon = Server.CreateObject("ADODB.Connection")
src = Server.MapPath("db/login.mdb")
sConnStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & src
adoCon.Open sConnStr
%>
What, therefore, I was hoping to achieve was some kind of modification of the second script, that is, the one which does use Server.MapPath and Microsoft.Jet.OLEDB.4.0 in order that I may connect using a script which my server likes.
I have just tried this, hoping it might do the trick:
Code:
<%
Dim adoCon
Set adoCon = Server.CreateObject("ADODB.Connection")
adoCon.Open "driver={Microsoft Access Driver (*.mdb)};DBQ=D:\business\login.mdb;
'src = Server.MapPath("db/login.mdb")
'sConnStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & src
'adoCon.Open sConnStr
%>
but I get the following error:
Expected statement
/NewLog/includes/dbconnection.inc, line 4
Hope I've made myself a little clearer.
Thanks again.
Steve