using System; using System.Collections.Generic; 10
usingSystem.ComponentModel;usingSystem.Data;usingSystem.Drawing;usingSystem.Linq;usin...
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace WindowsFormsApplication5
{
public partial class Form5 : Form
{
public Form5()
{
InitializeComponent();
}
SqlConnection conn;
private void Form5_Load(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
conn = new SqlConnection("server=.;database=db_15;uid=sa;pwd=");
SqlCommand cmd = new SqlCommand("select*from tb_command", conn);
SqlDataAdapter sda = new SqlDataAdater();
sda.SelectCommand = cmd;
DataSet ds = new DataSet();
sda.Fill(ds, "cs");
dataGridView1.DataSourse = ds.Tables[0];
}
}
}
请教各位大侠,上一段程序中,我已经调用了using System.Data.SqlClient;为什么 SqlDataAdapter sda = new SqlDataAdater();和SqlCommand两个地方都显示缺少using指令或程序集引用 展开
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace WindowsFormsApplication5
{
public partial class Form5 : Form
{
public Form5()
{
InitializeComponent();
}
SqlConnection conn;
private void Form5_Load(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
conn = new SqlConnection("server=.;database=db_15;uid=sa;pwd=");
SqlCommand cmd = new SqlCommand("select*from tb_command", conn);
SqlDataAdapter sda = new SqlDataAdater();
sda.SelectCommand = cmd;
DataSet ds = new DataSet();
sda.Fill(ds, "cs");
dataGridView1.DataSourse = ds.Tables[0];
}
}
}
请教各位大侠,上一段程序中,我已经调用了using System.Data.SqlClient;为什么 SqlDataAdapter sda = new SqlDataAdater();和SqlCommand两个地方都显示缺少using指令或程序集引用 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询