如何填充多个DATASET
写了几行代码,不知道哪里错了,总是提示FROM附近有错误,但是我在数据库里按我写的SELECT语句进行查询,没有出现差错呀,为什么?谢谢啦private void button1_Click(object sender, EventArgs e)
{
SqlConnection conn=new SqlConnection (@"Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Users\nn\Documents\Visual Studio 2008\Projects\CONNECT\tkfinal1.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True");
SqlCommand cmd=new SqlCommand();
conn.Open();
="select s_no1 AS 题号,s_sub AS 题目,s_sco AS 分数 from SUBJECT2"+"select s_no1,s_ans from ANSWER2";
SqlDataAdapter da=new SqlDataAdapter ( ,conn);
DataSet ds1=new DataSet ();
da.SelectCommand = new SqlCommand(, conn);
da.Fill (ds1);
dataGridView1.DataSource = ds1.Tables[0];
dataGridView2.DataSource = ds1.Tables[1];
conn.Close();
}