版主版主,update的问题
请看一下这个为什么是update语法错误,如果数据库是SQL2000就好好的,但是用ACCESS在编译时就报告说UPDATE语法错误,我都烦死了,麻烦帮帮忙啊,原代码如下:
using System;
using System.Data;
using System.Data.OleDb;
class DataAccess
{
public static void Main()
{
string strSelect=" Select * from WorkerInfo where WorkerID='001' and password='001' ";
OleDbConnection conn=new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source= myDataBase.mdb");
conn.Open();
OleDbDataAdapter ddt =new OleDbDataAdapter(strSelect,conn);
OleDbCommandBuilder cmdBuilder=new OleDbCommandBuilder(ddt);
DataSet thisDS=new DataSet();
ddt.Fill(thisDS,"WorkerInfo");
thisDS.Tables["WorkerInfo"].Rows[0]["Password"] = "111";
ddt.Update(thisDS,"WorkerInfo");
conn.Close();
}
}
还是帮帮吧,谢谢了