Having read a reply post by Chris Diver, I found the SMO “list Databases” very useful. Here is the code:
For Each db As Database In server.Databases
Me.ComboBox1.Items.Add(db.Name)
Next
The above code lists all Databases on SQL Server 2008 R2. I would like to omit System Databases from the above code results.
Thank you.
You can check the database. Don’t add if its system db.
Here is a piece of code for this