Retrieve the tables from sql server management studio from visual studio : I am working with C# Visual studio sql server has back end. This is my code in following code I am trying to retrieve table names based on database name.The command which used that is working perfectly in sql server management studio query builder but when I am running this it showing error "Object reference not set to instance of an object" in following line- cmbAlterAdd1.Items.Add(Reader2["name"].ToString());
I given name because in result column name is coming has name only has shown image. I think I need expert advice to solve this problem please help!!


    ConnectionPath = sqlPath;
                DBName = databaseName;
                SqlConnection con = new SqlConnection(ConnectionPath);
                con.Open();
                SqlCommand cmd = new SqlCommand("USE "+DBName+" SELECT name FROM sys.Tables", con);
                SqlDataReader Reader2 = cmd.ExecuteReader();
                while (Reader2.Read())
                {
                   cmbAlterAdd1.Items.Add(Reader2["name"].ToString());
                    
                }
                con.Close();

[IMAGE LINK][1]
  [1]: http://i.stack.imgur.com/xJC7D.jpg