|
protected void Page_Load(object sender, EventArgs e)
{
string sql = "select * from cheeck where shuihao=session['shuihao']";
SqlConnection con = new SqlConnection();
con.ConnectionString = "Server=i-server;database=fapiao;integrated security=SSPI;";
con.Open();
SqlDataAdapter sqlda = new SqlDataAdapter(sql,con);
DataSet ds = new DataSet();
DataTable mytable = ds.Tables["cheeck"]
上面是我的一段程序,我想问下,用FILL填充dataset对象时,
sqlda.Fill(ds,"cheeck");中的"cheeck"是上面用select语句查询出来的结果吗?我这里cheeck是张表,运行时显示错误,不知道怎么把查询出来的内容填充到ds里面,请教~ |
|