|
-
May 12th, 2011, 02:47 PM
#1
Thread Starter
New Member
VB 2005 Access Connection string -Please Help
I used the wizard in VB 2005 to add my database.
Under the "Applications Settings" area in VB my string is currently set to:
Name: MyDBConnectionString
Type: (Connection String)
Scope: Application
Value: Provider=Microsoft.Jet.OLEDB.4.0;Data Source="MyDB.mdb"
That works fine, it uses the database that is located in the apps startup directory... but I'd like to relocate the database to the "Application Data" folder instead.
I've been trying to figure this out for days, I've found lots of examples but they don't work, maybe because the "Applications Settings" can't use variables?
here is one of the many examples I've tried...
Provider=Microsoft.Jet.OLEDB.4.0;Data Source= "& Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\MyDB.mdb"
Any ideas? other than totally rewriting the app?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|