Link to home
Start Free TrialLog in
Avatar of grafixgirl
grafixgirl

asked on

ASP.net Ms. Access database connection?

Hello
I have switched hosting companies, and previously I had a folder "App_Data", where I had read and write permission. With the new company- they have given us read and write permission to another folder by the name access_db.
I know I need to make changes to the code below, but nothing seems to work

<asp:SqlDataSource ID="ctrlDataSource" runat="server"
            ProviderName="System.Data.OleDb"
            ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0; Data Source=|DataDirectory|members.mdb"

All help will be appreciated!
Avatar of samtran0331
samtran0331
Flag of United States of America image

check with the host...there are a lot of different ways a host can set up their folders...and this is a common problem so most hosts have a FAQ somewhere about connection strings...
also have a look at:
http://www.connectionstrings.com/?carrier=access
towards the bottom are some samples
Avatar of grafixgirl
grafixgirl

ASKER

Connection strings works if I create a folder App_Data and store the .mdb file there. (I tested it)
so my problem is how to change the following code:
ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0; Data Source=|DataDirectory|members.mdb"

so it looks in to access_db instead of App_Data folder
ASKER CERTIFIED SOLUTION
Avatar of samtran0331
samtran0331
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial