110,566
社区成员
发帖
与我相关
我的任务
分享
OleDbConnection conn = new OleDbConnection(@"Provider=vfpoledb;Data Source=" + textBox1.Text.Trim() + ";Extended Properties=dBASW IV;User ID=;Password=");
conn.Open();
System.Data.OleDb.OleDbCommand cmd = new OleDbCommand("select * from '" + textBox1.Text.Trim()+"' where '"+DBFName +"'='"+ExcelName +"'and '"+DBFCode+ "'='"+ExcelCode +"'and '"+DBFKsh +"'='"+ExcelKsh +"'and '"+DBFXxmc +"'='"+Xxmc +"'", conn);
OleDbDataReader dr = cmd.ExecuteReader();
if (dr.HasRows)
{
MessageBox.Show("成功!", "系统消息");
return;
}
"select * from '" + textBox1.Text.Trim()+"' where DBFName='"+ExcelName +"' and BFCode='" +ExcelCode +"' and DBFKsh ='"+ExcelKsh +"' and DBFXxmc ='" + Xxmc + "'";
"select * from '" + textBox1.Text.Trim()+"' where DBFName='"+ExcelName +"'and BFCode='" +ExcelCode +"' and DBFKsh ='"+ExcelKsh +"' and DBFXxmc ='" + Xxmc + "'";