-
How can read all database names in MSDE by VB
I want to develop an application based on MSDE and VB, When Login form load,
I want the user can select the database which he want to operate. How can
I read databse names by VB?
Thanks very much
-
Re: How can read all database names in MSDE by VB
SELECT * FROM SYSOBJECTS
that should return all table names
-t-
"WHB" <wanghanbo@hotmail.com> wrote:
>
>I want to develop an application based on MSDE and VB, When Login form load,
>I want the user can select the database which he want to operate. How can
>I read databse names by VB?
>Thanks very much
-
Re: How can read all database names in MSDE by VB
"WHB" <wanghanbo@hotmail.com> wrote:
>
>I want to develop an application based on MSDE and VB, When Login form load,
>I want the user can select the database which he want to operate. How can
>I read databse names by VB?
>Thanks very much
You might like to use SQL-DMO for this .
example:
Set sDMO = New SQLDMO.SQLServer
sDMO.Start True, ComputerName, "sa", ""
For Each DB In sDMO.Databases
Me.cboDB.AddItem DB.Name
Next
By the way, I also am doing a fairly extensive project using MSDE. I haven't
had much luck with the user groups so far. If you would be interested in
corresponding directly, please feel free.
Bob Feldsien
-
Re: How can read all database names in MSDE by VB
Use the SQL:
SELECT Name FROM master.dbo.sysdatabases
WHERE Name NOT IN ('master','tempdb','model','Northwind','Pubs')
This will give you all the user-created databases on the server.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks