•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 391,906 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,577 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 1708 | Replies: 9
![]() |
•
•
Join Date: Jan 2006
Location: Its the internet... i am everywhere lol
Posts: 274
Reputation:
Rep Power: 3
Solved Threads: 10
Just run a select query in the master database where the object is a database. anything in SQL Server has to be registered in the master database. When you create a table, stored proc, user etc. it is stored in the master database. Of course you need the correct permission to access the master database, but it is all there.
•
•
Join Date: Nov 2006
Location: new delhi
Posts: 38
Reputation:
Rep Power: 2
Solved Threads: 0
just go through www.connectionstrings.com for all your db queries
•
•
Join Date: Mar 2007
Posts: 30
Reputation:
Rep Power: 2
Solved Threads: 0
- i gave all connection strings correctly. thats no problem sir.but i want to select "what are all the databases avaliable in SQLServer" (example....MASTER,TRAINEE,STUDENTS,....)..can u help me? thanks in advance
•
•
Join Date: Mar 2007
Posts: 30
Reputation:
Rep Power: 2
Solved Threads: 0
•
•
•
•
Just run a select query in the master database where the object is a database. anything in SQL Server has to be registered in the master database. When you create a table, stored proc, user etc. it is stored in the master database. Of course you need the correct permission to access the master database, but it is all there.
thanks sir.but i want to know what are all the databases avaliable in the SQLSERVER. for example... while we connecting the sqlserver through vb.net (OLEDB) we specify the username and password and just select the database know.the same thing i need in my application...can u help me? thanks in advance....
•
•
Join Date: Jan 2006
Location: Its the internet... i am everywhere lol
Posts: 274
Reputation:
Rep Power: 3
Solved Threads: 10
Ok i will try again.
In SQL Server there is a system database called Master. This is the heart of SQL Server. Whenever you add an object to SQL Server such as a database, a user, a stored proc, a table, a column etc. it is put into the master database. Go look at the master database tables and you will see all your databases in there.
So alll you have to do is write a query to select all from the table in the master database where the object type is a database. e.g. select * from dbo.master.the_table_with_the_databasenames where the_type = the_database_type.
That is as close as i will go but it is just that one line. I could give you the select query but you will learn a lot more about SQL Server if you figure it out yourself.
In SQL Server there is a system database called Master. This is the heart of SQL Server. Whenever you add an object to SQL Server such as a database, a user, a stored proc, a table, a column etc. it is put into the master database. Go look at the master database tables and you will see all your databases in there.
So alll you have to do is write a query to select all from the table in the master database where the object type is a database. e.g. select * from dbo.master.the_table_with_the_databasenames where the_type = the_database_type.
That is as close as i will go but it is just that one line. I could give you the select query but you will learn a lot more about SQL Server if you figure it out yourself.
•
•
Join Date: Feb 2005
Location: Braintree, UK
Posts: 1,164
Reputation:
Rep Power: 7
Solved Threads: 58
Or you can just "EXEC sp_databases" look it up in Books on line (the manual that comes with SQL Server) find it from Start -> All programs -> Microsoft SQl Server -> Books online.
•
•
Join Date: Oct 2007
Posts: 2
Reputation:
Rep Power: 0
Solved Threads: 0
Declare
On event
'Add reference "Microsoft SQLDMO Object Library"
Dim sqlServers As SQLDMO.NameList
Dim sqlServerName As String On event
sqlServers = New SQLDMO.Application().ListAvailableSQLServers
For Each sqlServerName In sqlServers
cboServerName.Items.Add(sqlServerName)
Next
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb ASP.NET Marketplace
•
•
•
•
.net .net framework 3.0 access ajax asp avatar backup breach code combo custom daniweb data data protection database design developer development dom dropdownlist feed government hacker ibm medicine microsoft module msdn net news normalization office reader reuse security server skin software sql survey theme vista weather web windows workflow xml xoap
- vb.net database connection (VB.NET)
- Error in loading DLL (Error 48) in Access 2003 (MS Access and FileMaker Pro)
- Error loading C:\Progra~1\bar\1.bin\MSWBAR.dll (Viruses, Spyware and other Nasties)
- Problem inserting data into database (JSP)
- MS Access database and java (Java)
- Database access with Java platform (MS Access and FileMaker Pro)
- Resizing images from a SQL DataBase (ASP.NET)
- MySQL drivers not loading? (Java)
- Frameset,Showing loading..Please wait message (ASP.NET)
- Help with a reservation program! GUI Messed XD (Java)
Other Threads in the ASP.NET Forum
- Previous Thread: can't find entrypoint Error 453
- Next Thread: Webform - Loading an aspx page within a page



Linear Mode