Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread Folder of a database
Sun, Nov 11 2007 5:34 PMPermanent Link

Sergei Safar
Hi all,

how to know at runtime the folder of a specific database ? ElevateDB Manager shows this in the datails window of a database.

Any hint ?

Regards,

Sergei Safar
Sun, Nov 11 2007 7:30 PMPermanent Link

Richard Harding
the following code will do what you require.  (Well, it seems to works for me)

<Database> is the name of the Database.


  qyConfiguration.Close;
  qyConfiguration.DatabaseName := 'Configuration';
  qyConfiguration.SQL.Text := 'SELECT Path FROM Databases WHERE Name = ' +
QuotedStr(Database);
  qyConfiguration.Open;

  if (qyConfiguration.RecordCount = 0) then
  begin
     // ElevateDB Database not defined
  end;

Richard Harding

Mon, Nov 12 2007 10:22 AMPermanent Link

Sergei Safar
Hi Richard,

your code worked fine. Thank you.

Sergei Safar
Thu, Nov 15 2007 1:42 PMPermanent Link

"Royke"
"Sergei Safar" <hissa59 at ig com br> wrote in message
news:82DB5EA1-E0D5-4F98-958F-C1451C727D79@news.elevatesoft.com...
> Hi all,
>
> how to know at runtime the folder of a specific database ? ElevateDB
> Manager shows this in the datails window of a database.
>
> Any hint ?
>
> Regards,
>
> Sergei Safar

Or something like:

 CatalogTable.Open;
 if CatalogTable.Locate('Name', Database, []) then
   databasepath := CatalogTable.FieldByName('Path').AsString
 else
   databasepath := '?';
 CatalogTable.Close;

Roy

Image