title: Using SMO for retrieving SQL Server, Database, Table info
body: <p>I get the db names using:</p>
  <pre><code>SqlDataSourceEnumerator sdse = SqlDataSourceEnumerator.Instance;
  DataTable table = sdse.GetDataSources();
  </code></pre>
  <p>Then using the below I get a list of db's.</p>
  <pre><code>static void Main(string[] args)
          {
              {
                  //Connect to the local, default instance of SQL Server. 
                  Server srv;
                  srv = new Server(&quot;LAPTOP\\SQLEXPRESS&quot;);
                  //The connection is established when a property is requested.
  
                  Console.WriteLine(srv.Databases.ToString());
                  foreach (Database db in srv.Databases)
                  {
                      Console.WriteLine(db);
                  }
                  Console.ReadLine();
              }
          }
  </code></pre>
  <p>The problem is that I only get the system databases, no others, even though they exist. I don't know what to change to get the info for all of the databases. Any assistance would be appreciated.</p>