0

Hi,
How can I point or target my access database in a safe way? Meaning, if I'm going to change my project to another computer, it will not cause any connection problem to my database. Thanks in advance. :)

3
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by XEN0
0

how can i use that with this.,

provider = "Provider=Microsoft.ACE.OLEDB.12.0; Data Source="
            dataFile = "C:\Users\kg\Documents\testDB.accdb"            connString = provider & dataFile
0

I just added it as a resource in visual studio 2010

1.Go to Projects
2.Then Locatate where it says yourprojectname properties
3.Locate the Resources Tab
4.Click Add Resource in resources tab
5.Locate Database it will appear under files(after you located and added)
6.When you add a wizard should pop up choose dataset then check all the tables you want to use
7.in My Docuemts/Visual Studio 2010/Projects/yourprojectname/yourprojectname/bin/release should be a folder name resources with all the data needed to run on another computer keep it there
8. Ill modify your code to make it work with the short tut i wrote

provider = "Provider=Microsoft.ACE.OLEDB.12.0; Data Source="
            dataFile = "Resources\testDB.accdb"            connString = provider & dataFile

9.Test It on another computer

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.