Dim db = HySq-l.DataBaseFactory.CreateDatabase("t04") '
Dim Sq-l2 = "INSER-T IGNORE Into db (编号,品名,单位) " & _
"Sele-ct 编号,品名,计量单位," & _
"FROM cpb as b " & _
"WHERE NOT EXISTS ( " &
" SELEC-T 1 FROM db as a " &
"Where b.启用状态= '启用' and a.编号 = b.编号);" '
Dim dt2 As system.data.DataTable = db.ExecuteDataSet(Sq-l2).Tables(0)
Dim t2 As Table = e.Form.Controls("Table1").Table
MsgBox(Sql2)'排查错
上面执行:提示“无法找到表 0。
insert语句是无法返回表格的,只能使用ExecuteNonQuery执行