KNOWLEDGE BASE

If you are looking for a service with full root access at the fraction of the cost of a dedicated server consider utilizing Omnis virtual private server hosting platform


Access DSN Connections
Without DSN
<%
Set Cnn = Server.CreateObject("ADODB.Connection")
Cnn.open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=c:mydatabase.mdb"
%> 
OLE DB
<%
Set Cnn = Server.CreateObject("ADODB.Connection")
Cnn.open "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=c:mydatabase.mdb"
%> 
File DSN
<% Set Cnn = Server.CreateObject("ADODB.Connection")
Cnn.open "FILEDSN=ADSN"
%> 
With DSN and no User ID/Password
<%
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.open "DSNname"
%> 
With DSN and User ID/Password
<%
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.open "DSNname","username","password"
%> 
Without DSN, using a physical path as a reference
<%
Set Conn = Server.CreateObject("ADODB.Connection")
DSNtest="DRIVER={Microsoft Access Driver (*.mdb)}; "
DSNtest=dsntest & "DBQ=c:mydatabase.mdb"
Conn.Open DSNtest
%> 
Without DSN, using Server.MapPath
NOTE: Server.MapPath is the path from the Web server root. By default, this is C:InetpubWwwroot.
<%
Set Conn = Server.CreateObject("ADODB.Connection")
DSNtest="DRIVER={Microsoft Access Driver (*.mdb)}; "
DSNtest=dsntest & "DBQ=" & Server.MapPath("/databases/mydatabase.mdb")
Conn.Open DSNtest
%> 

References:
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q300382
AWARDS

We've been a leader in the web hosting industry since 1999.
Our focus on premier customer service, affordable prices, and maximum reliability has earned us a few awards.