Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 5 of 5 total
Thread How to get database list in ADO.NET?
Fri, Feb 13 2009 3:16 AMPermanent Link

"Hedley Muscroft"
In Delphi, TEDBSession has the 'GetDatabaseNames' and 'GetDatabases'
methods. How do I achieve the same thing with the ADO.NET provider?

The EDBConnection object seems to be roughly equivalent to a combination of
the VCL TEDBSession and TEDBDatabase objects, but I can't see any way of
retrieving a list of all the available databases for the selected Config
path.

Specifically, I need to get back a list of both database NAMES and also the
FOLDER PATH of each database.

Any ideas please?!
Fri, Feb 13 2009 3:32 AMPermanent Link

"Hedley Muscroft"
Ahah! I can answer my own question!

Connect to the "Configuration" database and perform 'select * from
databases'
Fri, Feb 13 2009 3:47 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Hedley

>Specifically, I need to get back a list of both database NAMES and also the
>FOLDER PATH of each database.

Again I know nothing about .Net but you should be able to query the configuration database. Try this in EDBManager

select * from databases

Just select the session not a database otherwise, if you select a database you'll have to use

select * from configuration.databases

You should be able to convert this to .net (I hope)

Roy Lambert [Team Elevate]
Fri, Feb 13 2009 5:05 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Hedley


You beat me by about 15 mins - ONLY because I was interrupted in my posting Smiley
Roy Lambert
Fri, Feb 13 2009 5:05 AMPermanent Link

"Hedley Muscroft"
Smile
Image