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

  • Thread starter Thread starter TM
  • Start date Start date
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
 
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.
 
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
 
Back
Top