How to open a SQL db selected from an Open dialog ...

In all the examples I've seen using SLQ and, the programmer selects the database at DESIGN TIME ... in fact, that's often not the way you want your program to work. I want to use the common OPEN dialog to let the user select his database, then open that one.

All I've figured so far is to hack the connection string and patch it with the FILENAME returned by the open dialog; and I can't imagine there's not a much more elegant approach, such as a "FILENAME" sub property of the connection string? But haven't found one.

Can anyone help?


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!