The connection string will have parameters like
dbq (the file name)
uid (user ID)
pwd (password)
You can prompt the user for them the first time then save the resulting connection string (or the individual parameters) in Settings variables to preseve them between sessions. The actual connections string will also depend on whether you are using OLEDB, SQL, ADO, etc for access. For example, ADO might be
Driver={Microsoft Access Driver (*.mdb)};Dbq=d:\temp\my.db;Uid=John;Pwd=Joshua;
Reverend Jim
Carpe per diem
3,600 posts since Aug 2010
Reputation Points: 561
Solved Threads: 447
Skill Endorsements: 32
Probably a form, maybe a dialog form, with several textboxes lablelled with the various pieces of information you'll need to make the connection string(i.e. server, login, name of the database, etc.). Of course you'll have to validate each piece of info to make sure it's in the right format.
tinstaafl
Nearly a Posting Virtuoso
1,326 posts since Jun 2010
Reputation Points: 355
Solved Threads: 230
Skill Endorsements: 14
You could just use a file browser control on form load and ask the user to select the appropriate *.accdb file. Of course, you'd have to ensure that the selected file is one that actually contains the correct tables. Remember to set the file mask to restrict the selection to accdb files.
Reverend Jim
Carpe per diem
3,600 posts since Aug 2010
Reputation Points: 561
Solved Threads: 447
Skill Endorsements: 32
Question Answered as of 5 Months Ago by
Reverend Jim
and
tinstaafl oops didn't realize it was solved lol
tinstaafl
Nearly a Posting Virtuoso
1,326 posts since Jun 2010
Reputation Points: 355
Solved Threads: 230
Skill Endorsements: 14