BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

retrieving all databases of sql server

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (ADO)
View previous topic :: View next topic  
Author Message
Pascal Schmidt-Volkmar
Guest





PostPosted: Fri Feb 13, 2004 12:08 pm    Post subject: retrieving all databases of sql server Reply with quote



Hi there,

how do I retrieve all databases that are connected to my sql server?

Thanks,

Pascal


Back to top
Mike Shkolnik
Guest





PostPosted: Fri Feb 13, 2004 12:25 pm    Post subject: Re: retrieving all databases of sql server Reply with quote



Pascal,

you must login to master database (this is system db and exist always) and
execute the query:
SELECT * FROM sysdatabases

--
With best regards, Mike Shkolnik
EMail: [email]mshkolnik (AT) scalabium (DOT) com[/email]
http://www.scalabium.com

"Pascal Schmidt-Volkmar" <nospam (AT) schmidt-volkmar (DOT) com> wrote in message:
news:402cbe22 (AT) newsgroups (DOT) borland.com...
Quote:
Hi there,

how do I retrieve all databases that are connected to my sql server?

Thanks,

Pascal





Back to top
Viatcheslav V. Vassiliev
Guest





PostPosted: Fri Feb 13, 2004 12:38 pm    Post subject: Re: retrieving all databases of sql server Reply with quote



Quote:
my sql server?

My MS SQL Server or MySQL server?

Examine siCatalogs schema (with TADOConnection.OpenSchema)

//------------------------------------------
Regards,
Vassiliev V. V.
http://www.managed-vcl.com - using .Net objects in Delphi for Win32 +
ADO.Net
http://www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)

"Pascal Schmidt-Volkmar" <nospam (AT) schmidt-volkmar (DOT) com> сообщил/сообщила в
новостях следующее: news:402cbe22 (AT) newsgroups (DOT) borland.com...
Quote:
Hi there,

how do I retrieve all databases that are connected to my sql server?

Thanks,

Pascal





Back to top
Jeremy Collins
Guest





PostPosted: Fri Feb 13, 2004 12:55 pm    Post subject: Re: retrieving all databases of sql server Reply with quote

Mike Shkolnik wrote:

Quote:
Pascal,

you must login to master database (this is system db and exist always) and
execute the query:
SELECT * FROM sysdatabases

This requires an SQL login - you can call NetServerEnum to
get a list of SQL Servers whether you can connect to them
or not.




--
jc

Remove the -not from email

Back to top
Mike Shkolnik
Guest





PostPosted: Fri Feb 13, 2004 3:10 pm    Post subject: Re: retrieving all databases of sql server Reply with quote


Jeremy,

original question is how to retrieve the list of databases in SQL-server.
I answered on this question.

But you answer on another question - how to retrieve a list of servers.

--
With best regards, Mike Shkolnik
EMail: [email]mshkolnik (AT) scalabium (DOT) com[/email]
http://www.scalabium.com

news:402cc949$1 (AT) newsgroups (DOT) borland.com...
Quote:
Mike Shkolnik wrote:

Pascal,

you must login to master database (this is system db and exist always)
and
execute the query:
SELECT * FROM sysdatabases

This requires an SQL login - you can call NetServerEnum to
get a list of SQL Servers whether you can connect to them
or not.




--
jc

Remove the -not from email



Back to top
Jeremy Collins
Guest





PostPosted: Fri Feb 13, 2004 6:19 pm    Post subject: Re: retrieving all databases of sql server Reply with quote

Mike Shkolnik wrote:

Quote:
Jeremy,

original question is how to retrieve the list of databases in SQL-server.
I answered on this question.

But you answer on another question - how to retrieve a list of servers.

Because I didn't read the question properly.

Or maybe because it's Friday the 13th - um, yeah, that's got to
be the explanation....

Apologies for attempting to correct your correct answer with
an incorrect one.


--
jc

Remove the -not from email

Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (ADO) All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.