日期:2014-05-17 浏览次数:21002 次
private void btnTestADO_Click(object sender, RoutedEventArgs e)
{
using (SqlConnection conn = new SqlConnection("Data Source=.;Initial Catalog=MyTest;User ID=sa;Password=fengsj0113410258"))
{
try
{
conn.Open();
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
}
MessageBox.Show("Executing Finished");
}