发布网友 发布时间:2022-04-23 22:40
共1个回答
热心网友 时间:2023-04-24 19:56
string connstr=""; DataSet ds=new DataSet(); SqlConnection conn=new SqlConnection(connstr); string sql="select * from test where name='jack'" SqlDataAdapter sda = new SqlDataAdapter(sql,conn); sda.Fill(ds); string name = ds.Tables[0].Rows[0]["name"].ToString();