SqlConnection con = new SqlConnection("Data Source=localhost;Initial Catalog=database;user id=sa;password=12345;min pool size=4;max pool size=100;");
SqlDataAdapter sdaTest = new SqlDataAdapter("select B from A", con);
DataTable dtblTest = new DataTable();
try
{
sdaTest.Fill(dtblTest);
}
catch (Exception ex)
{
throw;
}
dataTable dt=类.方法名("select * from A")
string StrValuedt=dt.rows[0]["B"].tostring();
StrValuedt就是你要的值!
不懂再问我!!!