How do I connect to my Access database from my web site?

To access your Access database from your web site, follow this procedure:

 

  1. Upload your Access database with FTP to your /_private folder located in your web site's root folder. This is the only folder that has the proper permissions for file-based databases for access from the web server.

     

  2. Use this connection string in your ASP code:

    Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=d:\inetpub\xxx\_private\accessfile.mdb;"

    You may also request a System DSN to connect to your database.

     

NOTE: This method is the most reliable and stable method of connecting to an Access database. Using this method allows you to modify the Access file name in your code whenever you need to. It also allows you to connect without requiring a DSN.

Do NOT use the following method! It uses a less stable ODBC driver which can cause your site to fail!

 

    Conn.Open "Driver={Microsoft Access Driver (*.mdb)};DBQ=d:\inetpub\xxx\_private\accessfile.mdb;"

 

  • 13 Users Found This Useful
Was this answer helpful?

Related Articles

Where can I find documentation for ServerObject's AspMail component?

This documentation can be found at: http://www.serverobjects.com/products.html For...

How do I upload files through my web pages?

You can use Software Artisan's SAFileUP. This is an ASP component that allows you to upload files...

What is PageCounter and how do I use it?

About Page Counter PageCounter is an object that counts and displays the number of times a Web...

How do I setup Microsoft Outlook Express to read my e-mail?

Follow these steps: Open Microsoft Outlook Express. From the Tools menu, click...

How do I setup Netscape Messenger to read my e-mail?

Follow these steps: Open Netscape Navigator. Click the Edit menu and then click Preferences......