473,387 Members | 1,535 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Want to grab a list of available databases on a given server

I have MSDE running on my system and I want to get a list of databases
for that server programmatically. I'm using vb.net and I want to view,
add, delete and modify databases on a server from within a class.
I'm aware I can use the "Server Explorer" feature in Visual Studio, but
that isn't what I'm looking for. Any references or suggestions on where
to start are appreciated.

TIA

Ralf
Jul 23 '05 #1
7 1603
Stu
Look up SQLDMO on the web; not sure how it will work with MSDE, but
it's the object model for working with SQL Server programmatically.

Stu

Jul 23 '05 #2
Thanx. A quick review looks promising. 'Preciate the help.
"Stu" <st**************@gmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
: Look up SQLDMO on the web; not sure how it will work with MSDE, but
: it's the object model for working with SQL Server programmatically.
:
: Stu
Jul 23 '05 #3
This seems to be exactly what I'm looking for. I do have a problem
however. I have MSDE running on my system, but I have no idea what to
use for user id and password. Any suggestions?
"Stu" <st**************@gmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
: Look up SQLDMO on the web; not sure how it will work with MSDE, but
: it's the object model for working with SQL Server programmatically.
:
: Stu
:
Jul 23 '05 #4
_AnonCoward (ab*@xyz.com) writes:
This seems to be exactly what I'm looking for. I do have a problem
however. I have MSDE running on my system, but I have no idea what to
use for user id and password. Any suggestions?


I don't know DMO, but you should be able to log with integrated security.
Anything else would be very very strange.
--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 23 '05 #5
On Tue, 07 Jun 2005 20:03:18 GMT, "_AnonCoward" <ab*@xyz.com> wrote:
This seems to be exactly what I'm looking for. I do have a problem
however. I have MSDE running on my system, but I have no idea what to
use for user id and password. Any suggestions?
Any user that is listed in Security Logins in the Enterprise Manager.

You can use the sa account and it's password, or you can create a new
account, or you can use integrated security if you installed SQL to
use Windows authentication.


"Stu" <st**************@gmail.com> wrote in message
news:11**********************@f14g2000cwb.googleg roups.com...
: Look up SQLDMO on the web; not sure how it will work with MSDE, but
: it's the object model for working with SQL Server programmatically.
:
: Stu
:


Jul 23 '05 #6
On Tue, 07 Jun 2005 17:52:02 GMT, "_AnonCoward" <ab*@xyz.com> wrote:
I have MSDE running on my system and I want to get a list of databases
for that server programmatically. I'm using vb.net and I want to view,
add, delete and modify databases on a server from within a class.
I'm aware I can use the "Server Explorer" feature in Visual Studio, but
that isn't what I'm looking for. Any references or suggestions on where
to start are appreciated.


I have used the Information Schema to do this with:

select catalog_name as name from information_schema.schemata

This worked fine with SQL7, but I have had some problems with it with
SQL2K. User databases don't show up in the Information Schema until
they have been accessed.

Jul 23 '05 #7
On Tue, 07 Jun 2005 22:18:30 GMT, Joe Cool wrote:
On Tue, 07 Jun 2005 17:52:02 GMT, "_AnonCoward" <ab*@xyz.com> wrote:
I have MSDE running on my system and I want to get a list of databases
for that server programmatically. I'm using vb.net and I want to view,
add, delete and modify databases on a server from within a class.
I'm aware I can use the "Server Explorer" feature in Visual Studio, but
that isn't what I'm looking for. Any references or suggestions on where
to start are appreciated.


I have used the Information Schema to do this with:

select catalog_name as name from information_schema.schemata

This worked fine with SQL7, but I have had some problems with it with
SQL2K. User databases don't show up in the Information Schema until
they have been accessed.


A alternative that would work with SQL 6.5 and up would be

SELECT name from master.dbo.sysdatabases

Almost certainly *won't* work with any non-MS RDBMS, though.
Jul 23 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Boris Ammerlaan | last post by:
This notice is posted about every week. I'll endeavor to use the same subject line so that those of you who have seen it can kill-file the subject; additionally, Supersedes: headers are used to...
0
by: Mike Cox | last post by:
Andy M wrote: > ALERT > > There is a person by the name of Mike Cox who's trying > to turn this mailing list into a Big-8 newsgroup. No, I'm trying to get teh postgresql groups which are...
6
by: fmdevelopertim | last post by:
New to AJAX so sorry if this is simple. Have a page that gives the user a list to select a brand. Based on the brand selected it shows a list of sizes available using the following code: ...
5
by: =?Utf-8?B?U29waGll?= | last post by:
Hi, I try to design a window application to grab attachment from a list of given URL and save them to a user difined folder on their local drive. The list of URL for me to grab attachment will...
3
by: mandarkraftware | last post by:
Hi All, We have the following list of consultants currently available. Name / Job Title Summary Ramchandran/Java · 7+ years experience in the field of Software Development. · Expertise in...
1
by: SkyGringo | last post by:
Hi, I'm using the 64-bit version of SQL Server 2005, SP2, on Windows Server 2003 R2 X64 Enterprise Edition. I've got a bunch of users out there who are the db_owner, db_accessadmin and...
1
by: SkyGringo | last post by:
Hi. We are using SQL Server 2005 64-bit on Windows Server 2003 R2 x64 Enterprise Edition. I have a really weird problem where I have people out there who are placed in the db_owner,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.