Monday, November 19, 2012 6:49 AM
I have created a Application which shows the List of available SQL Server on Network and Database List.
But, the application shows only Server Name on the Remote PC. Does not show the Database...
On Local PC on which I am Running SQL Server 2008, it shows both the Server List and the Database of that Server....
So kindly please help me.....
This is my Code....
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim datatable = SmoApplication.EnumAvailableSqlServers(False)
ComboBox1.ValueMember = "Name"
ComboBox1.DataSource = datatable
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
If ComboBox1.SelectedIndex <> -1 Then
Dim serverName As String = ComboBox1.SelectedValue.ToString()
Dim server As Server = New Server(serverName)
For Each database As Database In server.Databases
Catch ex As Exception
Dim exception As String = ex.Message
A Form Has a two Combobox.......
Please Help me.
Monday, November 19, 2012 10:08 AM
Tuesday, November 20, 2012 8:07 AM
Thank You, For interesting......
I don't know much about it, But I have a two PC, which are connected via Modem.....
And on which PC I have Installed a SQL Server 2008 on this PC the Application shows the both Server List and Database... But the other PC while I run the Application on it, its only shows the Server List, but does not shows any database.....
Can you help me via a Team Viewer....or even i can Call You....
I am from india...but I really want to do it.. So, please help me..
Tuesday, November 20, 2012 8:11 AM
I have installed SQL Server 2008 only on one PC.... Which acts as Server and the other access the data from the Server... via LAN.
If I create an Application and Fires the Query with predefined Connection String.... than my Application is running very Fine....
My Purpose for above question is, I want to modify the connection string on run time.....
Wednesday, November 21, 2012 6:26 AMPlease Help.......
Wednesday, November 21, 2012 7:21 AM
Wednesday, November 21, 2012 12:32 PM
No, No exception occurs....
but on my second PC its not showing the database list only shows the server... and on my main PC where I installed a SQL Server it run perfectly.....
Wednesday, November 21, 2012 12:52 PM
This is a SQL Server PC where Application Shows the Database List...
This is a Remote PC where it shows only Server List...
Both are connected via LAN..... From my Router + Modem .......
Please Help Me...
Thursday, November 22, 2012 4:49 PM
Have you debugged your app, if everything works? Does the logon really works, do you get informations of the server, like the name.
Modem/Router?!; are both machines in the same domain and do you login with an domain account, which do have permissions in SQL Server?
Olaf HelperBlog Xing
Saturday, November 24, 2012 4:19 AMNo, I am not log in into a domain, I just disable the SQL Severer Windows Firewall.......
and I don't know much about Log in in to a SQL Server...
Saturday, November 24, 2012 7:02 AMWith your code, you logon to SQL Server with your Windows account; in a domain this works pretty well, but not in a workgroup. You have to create a SQL account and have to use this to get it work; as I already wrote, the login requires permission to logon and query the existing databases.
Olaf HelperBlog Xing
- Marked As Answer by Iric WenModerator Tuesday, November 27, 2012 9:16 AM
Monday, November 26, 2012 10:26 AMYup, Thank You....