Antarix
Antarix

Reputation: 685

Can I access MS Access file as Database for ASP.NET site without SQL hosting plan?

I am creating a site with ASP.NET C#. Now my problem is I purchased one hosting plan without SQL database hosting, so can I use MS Access as my database for my site? I have taken hosting plan from net4.in.

Upvotes: 3

Views: 1962

Answers (3)

profMamba
profMamba

Reputation: 1008

Yes you can. Make sure you have the appropriate security access to the file - this can typically be done by putting the Access .mdb file in the App_Data 'magic' folder in ASP.NET. Update the connection string in your application configuration / web.config with the appropriate values.

Refer to connectionstrings.com for building / configuring the connection string.

Not all features available in SQL Server are available in Access and there might be slight changes to your queries / SQL syntax so make sure Access has everything you want before you go down this route - the extra cost of switching / upgrading your host will probably be less than modifying and retesting your code.

EDIT: ASP.NET also supports disconnected database MDF files in the App_Data - it might be worth checking with your host if they support this as you would not need to alter your code at all.

Upvotes: 3

Antarix
Antarix

Reputation: 685

Thanks for all your answer but i tried by myself downloaded one sample application and uploaded on my server, and its working. So now i can use MS Access database on my server which is without SQL server hosting. As there was very small need for using database so i used MS Access here.

Upvotes: 0

AdamM
AdamM

Reputation: 141

The short answer is yes, however I'd strongly recommend against it. The reasons for using Sql Server are limitless. Sql Server is much more secure and it performs better than Access when it comes to optimizing queries. The Sql Server Query Optimizer is remarkable in its ability to analyze the optimum route for pulling back data and is very efficient in preserving server resources. However, if you are unable to pay the price for Sql hosting then you can certainly use Access. This article: http://www.aspfree.com/c/a/Microsoft-Access/Connecting-to-a-Microsoft-Access-database-with-ASPNET/ can help you get started... it is outdated, but it should get you on the right path for setting up the connection string to grant your application access to your MS Access data.

Upvotes: 0

Related Questions