我正在尝试实现一种将提供的方法,SqlConnection
我应该怎么做?
public class DAL
{
public bool dbCon()
{
string comboValue;
try
{
using (SqlConnection sqlConn =
new SqlConnection(@"Data Source =VirtualXP-64805;Initial Catalog=CTS_Demo;Integrated Security=SSPI"))
{
sqlConn.Open();
}
}
catch (SqlException Ex)
{
MessageBox.Show(Ex.ToString());
}
}
}