Change the "if" to a "while":
if (sdr.Read())
Becomes
while (sdr.Read())
And append the text to your listbox instead of overwriting it.
[edit]added my method for this - Original Griff[/edit]
Your code isn't the method I use, but it should work. The way I do it is:
using (SqlConnection con = new SqlConnection(@"Data Source=GRIFFPC\SQLEXPRESS;Integrated Security=True"))
{
con.Open();
using (SqlCommand cmd = new SqlCommand("sp_databases", con))
{
cmd.CommandType = CommandType.StoredProcedure;
SqlDataReader read = cmd.ExecuteReader();
while (read.Read())
{
Console.WriteLine((string)read["DATABASE_NAME"]);
}
}
}
So a quick replacement of the security information with yours should make it work as well.
BTW: Change your admin login - you just told the entire world how to destroy your databases...