Database Reference
In-Depth Information
txtResult.AppendText(rdr[0].ToString());
txtResult.AppendText("\t\t\t");
txtResult.AppendText(rdr[1].ToString());
txtResult.AppendText("\n");
}
}
while (rdr.NextResult());
// Close data reader
rdr.Close();
}
catch (SqlException ex)
{
MessageBox.Show(ex.Message + ex.StackTrace,"Exception Details");
}
finally
{
// Close connection
conn.Close();
}
6. To set the MultipleResults form as the start-up form, modify the Program.cs
statement.
Application.Run(new SchemaTable ());
to appear as:
Application.Run(new MultipleResults());
7. Build the project, and run it by pressing Ctrl+F5. You should see the results in
Figure 14-12.
 
Search WWH ::




Custom Search