 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Daniel Guest
|
Posted: Wed Jul 06, 2005 3:55 am Post subject: Enumerate DataBase |
|
|
Hi,
I am new to database, this is really a stupid question. But I do need
help.
I use the following command want to get list of database.
ADOQuery.SQL.Add('Exec SP_DATABASES');
ADOQuery.Active := True;
Total count is available as AdoQuery.RecordCount, but how can I get the
database name?
for i:=0 to AdoQuery.RecordCount-1 do
begin
//dbList.Add(ADOQuery.Records[i].Name);
AdoQuery.Next;
end;
|
|
| Back to top |
|
 |
Thomas Steinmaurer Guest
|
Posted: Wed Jul 06, 2005 6:11 am Post subject: Re: Enumerate DataBase |
|
|
| Quote: | I am new to database, this is really a stupid question. But I do need
help.
I use the following command want to get list of database.
ADOQuery.SQL.Add('Exec SP_DATABASES');
ADOQuery.Active := True;
Total count is available as AdoQuery.RecordCount, but how can I get the
database name?
for i:=0 to AdoQuery.RecordCount-1 do
begin
//dbList.Add(ADOQuery.Records[i].Name);
AdoQuery.Next;
end;
|
dbList.Clear;
while not ADOQuery.EOF do
begin
dbList.Add(ADOQuery.FieldByName('DATABASE_NAME').AsString);
ADOQuery.Next;
end;
--
HTH,
Thomas Steinmaurer
LogManager Series - Logging/Auditing Suites supporting
InterBase, Firebird, Advantage Database, MS SQL Server and
NexusDB V2 (NEW!)
Upscene Productions
http://www.upscene.com
|
|
| Back to top |
|
 |
Daniel Guest
|
Posted: Wed Jul 06, 2005 7:45 am Post subject: Re: Enumerate DataBase |
|
|
Hi, Thomas,
Thanks a lot.
Daniel
"Thomas Steinmaurer" <t.steinmaurer (AT) _no_upscene_spam_ (DOT) com>
???????:42cb7627 (AT) newsgroups (DOT) borland.com...
| Quote: | I am new to database, this is really a stupid question. But I do need
help.
I use the following command want to get list of database.
ADOQuery.SQL.Add('Exec SP_DATABASES');
ADOQuery.Active := True;
Total count is available as AdoQuery.RecordCount, but how can I get
the database name?
for i:=0 to AdoQuery.RecordCount-1 do
begin
//dbList.Add(ADOQuery.Records[i].Name);
AdoQuery.Next;
end;
dbList.Clear;
while not ADOQuery.EOF do
begin
dbList.Add(ADOQuery.FieldByName('DATABASE_NAME').AsString);
ADOQuery.Next;
end;
--
HTH,
Thomas Steinmaurer
LogManager Series - Logging/Auditing Suites supporting
InterBase, Firebird, Advantage Database, MS SQL Server and
NexusDB V2 (NEW!)
Upscene Productions
http://www.upscene.com
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|