Link to home
Start Free TrialLog in
Avatar of ST3VO
ST3VOFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Get/Set ADO Connection string at Runtime or from File

Hi all,

I've got an application which connects to an access DB via ADO.
I need to be able to 1. Setup the connection string at runtime or 2. pick the connection string from a file.

The reason why I want to do this is because I would like to have different connections available....for example: Access, SQL Server etc...

Is there away to do this please?

Thanks

ST3VO
Avatar of Tomas Helgi Johannsson
Tomas Helgi Johannsson
Flag of Iceland image

  Hi!

Here is one example : http://www.swissdelphicenter.ch/torry/showcode.php?id=551
and here is another example : http://www.swissdelphicenter.ch/torry/showcode.php?id=2271
I personally use similar method like the first one to connect to Access DB where
I have some text instead of the path  to the db in the connection string and on appl startup I
replace that text with the actual path to the db.
Hope this helps.

Regards,
   Tomas Helgi
ASKER CERTIFIED SOLUTION
Avatar of Johnjces
Johnjces
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Did any of this help you?
Avatar of ST3VO

ASKER

Yes it did! Sorry about me delay! Thanks a lot!!!!

ST3VO