| | |
Loading All Database Name
Please support our ASP.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Jan 2006
Posts: 275
Reputation:
Solved Threads: 11
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
Posts: 44
Reputation:
Solved Threads: 0
just go through www.connectionstrings.com for all your db queries
•
•
Join Date: Mar 2007
Posts: 32
Reputation:
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: 32
Reputation:
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
Posts: 275
Reputation:
Solved Threads: 11
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.
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:
Solved Threads: 0
Declare
On event
ASP.NET Syntax (Toggle Plain Text)
'Add reference "Microsoft SQLDMO Object Library" Dim sqlServers As SQLDMO.NameList Dim sqlServerName As String
On event
ASP.NET Syntax (Toggle Plain Text)
sqlServers = New SQLDMO.Application().ListAvailableSQLServers For Each sqlServerName In sqlServers cboServerName.Items.Add(sqlServerName) Next
![]() |
Similar Threads
- vb.net database connection (VB.NET)
- Error loading C:\Progra~1\bar\1.bin\MSWBAR.dll (Viruses, Spyware and other Nasties)
- Error in loading DLL (Error 48) in Access 2003 (MS Access and FileMaker Pro)
- 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
| Thread Tools | Search this Thread |
.net 2.0 3.5 ajax alltypeofvideos appliances application asp asp.net bc30451 beginner box browser businesslogiclayer button c# cac checkbox class commonfunctions control countryselector dataaccesslayer database datagrid datagridview datalist deployment development dgv dialog dropdownlist dropdownmenu dynamic dynamically edit embeddingactivexcontrol expose feedback fileuploader fill findcontrol flash form formatdecimal formview gridview gudi iis image javascript list listbox login microsoft mouse mssql nameisnotdeclared news novell numerical opera panelmasterpagebuttoncontrols parent problem radio redirect registration relationaldatabases reportemail schoolproject search security select sessionvariables silverlight smoobjects software sql sql-server sqlserver2005 ssl textbox tracking treeview validatedate validation vb.net videos vista visualstudio vs2008 web webapplications webdevelopment webprogramming webservice wizard xsl youareanotmemberofthedebuggerusers






