Support Portal Language
 
HomeKnowledge BaseScriptingAccessConnecting to Access Databases
Information
Article ID96
Created On12/11/2008
Modified12/11/2008
Share With Others
Connecting to Access Databases

To be able to connect to a MS Access database, please login to your Control Panel and create a new DSN connection with the following information:

* Name of DSN: mydatabase.dsn        (Use whatever name you desire)

*Path & Name of database: d:\users\<FTPUSERNAME>\public_html\mydata\mydatabase.mdb (Please note the database is in a directory
called 'mydata' which is in the root path of your FTP space)

* Database Username: roger (Please assign a username of your choice)

* Database Password: bfg123 (Please assign a password of your choice)



The FTP root is the first directory you access in your FTP space, but the path above is the full path (which is called the Absolute path). This path is needed in full, then the DSN will know exactly where to look and not to get confused by any other database that maybe called the same name on the same server.

To be able to open a connection in ASP, please use the below code:

<%
    Set MyConn = Server.CreateObject("ADODB.Connection")
    MyConn.Open ("FILEDSN=/fullpath/mydatabase.dsn;UID=roger;PWD=bfg123")
%>