Click here to Skip to main content
15,885,365 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Provider=Microsoft.ACE.OLEDB.12.0;Data Source="C:\Users\Hrishi\Documents\Visual Studio 2010\WebSites\WebSite7\App_Data\vic.accdb"


that code gives me error?
I know that when we put database file in App_Data folder we use like ~\\App_Data\vic.accdb but it gives me error so please solve my problem


Thanks in advance

What I have tried:

Provider=Microsoft.ACE.OLEDB.12.0;Data Source="C:\Users\Hrishi\Documents\Visual Studio 2010\WebSites\WebSite7\App_Data\vic.accdb"

it is the code that giving me error
Posted
Updated 31-Aug-17 21:04pm

1 solution

Use Server.MapPath(@"~\App_Data\vic.accdb") instead.
But... using an Access database in a website is not a good idea: websites are by definition multiuser, and Access is a very, very poor choice for multiuser access. It can be done, but it gives huge problems in production.

Most hosting services provide either SQL Server or MySQL both of which are designed for multiuser - I'd strongly recommend you switch to one of those.
 
Share this answer
 
Comments
Hrishikeshkamble 14-Oct-17 4:59am    
Ok...Thanks

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900