|
-
Jul 1st, 1999, 07:51 AM
#1
Thread Starter
New Member
S.O.S.
Please help me. I am creating a program in VB 5.0 and am letting the user pick a access database with the commondialog control. I am using the data control to access my database. Can anyone give me some code I can add to let the user pick a database?
Thanks
-VbMichael
-
Jul 1st, 1999, 03:29 PM
#2
Lively Member
You can use the common dialog control to actually 'pick' the .mdb file. Once you have the path name to the file, assign the database to your db variable (or to your data control) and you should be in business.
Bash
-
Jul 1st, 1999, 07:10 PM
#3
Thread Starter
New Member
I've tried entering the path directly into the data control. I may have forgoten to type this before but my msflexgrid that I am useing to show the user the contence is still blank after I try to directly enter the path into the data control. I've also tried putting an SQL statment in the recordsource proporty to serch for all fields and still nothing shows up.
-
Jul 5th, 1999, 09:03 PM
#4
New Member
The way I have done this is to connect the data control via a connection string. Build the connection string (with the file chosen from the common dialog) and then write it to the data control. Do a .refresh and all should be hunky dory.
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
|