how to add access database to asp.net application on server

T

TM

I am trying to learn ASP.net and created an ASP.net application on my
windows 2003 server on my home LAN, and was wondering the correct way to add
an access database to this application ?

Do I just copy it to the application folder, where do I put it ?

Also, how can I allow my application to access this file correctly ?

I know most applications use SQL databases but I am trying to start small
and work my way up to that.

Any help is greatly appreciated. Thanks
 
D

Dmitriy Lapshin [C# / .NET MVP]

Hi Tony,

1. Ensure you have Microsoft Jet OLEDB provider installed on your server
2. Copy the database to a folder that is not accessible through Web requests
(that is, either outside the Inetpub folder, or at least disable ALL web
access for that folder in IIS). Not so important for home use, but you can
run into trouble on a bigger project.
3. Employ the System.Data.OleDb provider to access the database. You will
need a connection string first, please refer to the Microsoft Jet OLEDB
provider documentation on how to build the connection string for that
provider.

Please feel free to ask additional questions if you'll have any.
 
T

TM

Awesome dud. That worked like a charm. Thank you
--
Tony



Dmitriy Lapshin said:
Hi Tony,

1. Ensure you have Microsoft Jet OLEDB provider installed on your server
2. Copy the database to a folder that is not accessible through Web requests
(that is, either outside the Inetpub folder, or at least disable ALL web
access for that folder in IIS). Not so important for home use, but you can
run into trouble on a bigger project.
3. Employ the System.Data.OleDb provider to access the database. You will
need a connection string first, please refer to the Microsoft Jet OLEDB
provider documentation on how to build the connection string for that
provider.

Please feel free to ask additional questions if you'll have any.

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

TM said:
I am trying to learn ASP.net and created an ASP.net application on my
windows 2003 server on my home LAN, and was wondering the correct way to add
an access database to this application ?

Do I just copy it to the application folder, where do I put it ?

Also, how can I allow my application to access this file correctly ?

I know most applications use SQL databases but I am trying to start small
and work my way up to that.

Any help is greatly appreciated. Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top