using a connection string is less fraught with issues when moving between systems
to hardcode it use;
Code:
strConnection = "Driver= {MicrosoftAccessDriver(*.mdb)};DBQ=C:\webroot\DbName.mdb;"
if the mdb will remain in the same folder relative to the site
Code:
strConnection = "Driver= {MicrosoftAccessDriver(*.mdb)};DBQ=" & server.mappath("/path/DbName.mdb") & ";"
the above are for ODBC.
the preferred method is to use OLEDB
Hardcoded;
Code:
strConnection = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\webroot\DbName.mdb;"
Relative;
Code:
strConnection = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.Mappath("/path/DbName.mdb") & ";"
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
|