C#+ACCESS System.Data.OleDb.OleDbException: 至少一个参数没有被指定值。
**************异常文本**************System.Data.OleDb.OleDbException:至少一个参数没有被指定值。代码如下:pr...
************** 异常文本 **************
System.Data.OleDb.OleDbException:
至少一个参数没有被指定值。
代码如下:
private void ListView1_doubleclick(object sender ,EventArgs
e)
{
//createt();
int index =
listView1.SelectedIndices[0];//获取当前选中的索引
//textBox1.Text =
listView1.Items[index].Text; //当前索引那行的第一列,以此类推
string Text =
listView1.Items[index].Text;
if (Text != null)
{
if (Text == "User")
{
MessageBox.Show("不可查看!!");
}
else
if (Text ==
"DTC")
{
MessageBox.Show("不可查看!!");
}
else
{
conn.Open();
//string sql =
"insert into Selecttable(名称,值或诊断结果,诊断时间) select ECUName ,ECUColumn ,诊断时间 from "
+ Text + " ";
string sql = " select * into Selecttable
from " + Text + " ";
OleDbCommand cmd = new
OleDbCommand(sql, conn);
cmd.ExecuteNonQuery();
Form2 mychat = new
Form2();
mychat.Show();
conn.Close();
}
} 展开
System.Data.OleDb.OleDbException:
至少一个参数没有被指定值。
代码如下:
private void ListView1_doubleclick(object sender ,EventArgs
e)
{
//createt();
int index =
listView1.SelectedIndices[0];//获取当前选中的索引
//textBox1.Text =
listView1.Items[index].Text; //当前索引那行的第一列,以此类推
string Text =
listView1.Items[index].Text;
if (Text != null)
{
if (Text == "User")
{
MessageBox.Show("不可查看!!");
}
else
if (Text ==
"DTC")
{
MessageBox.Show("不可查看!!");
}
else
{
conn.Open();
//string sql =
"insert into Selecttable(名称,值或诊断结果,诊断时间) select ECUName ,ECUColumn ,诊断时间 from "
+ Text + " ";
string sql = " select * into Selecttable
from " + Text + " ";
OleDbCommand cmd = new
OleDbCommand(sql, conn);
cmd.ExecuteNonQuery();
Form2 mychat = new
Form2();
mychat.Show();
conn.Close();
}
} 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询