问题出现可能有两种原因:
1:你试一下dubug,,看看你的插入的string是否对
2:有可能你还没有看到string时候已经出错了,比如应该是 '"+TextBox.text+"'你写成了'TextBox.text'

解决方案 »

  1.   

    你的这个rglist表中有没有主键?如果没有的话不能使用OleDbCommandBuilder
      

  2.   

    你需要手动定义OleDbDataAdapter的InsertCommand
      

  3.   

    那个表有主键, smoothwood(I try my best) 所说的手动定义OleDbDataAdapter的InsertCommand是什么意思?我以前做的数据插入也未手动定义啊
      

  4.   

    就是你需要自己写DataAdapter的InsertCommand
    比如:OleDbDataAdapter.InsertCommand=new oledbcommand("insert ....")
    ______________________________
    如果有主键,那你就只有检查一下给字段赋的值对不对了...
      

  5.   

    字段赋值应该没问题,我把dr["name"] = ID_NAME.Text;等换为dr["name"] = "aa";等也同样出错。
      

  6.   

    most likely, in Microsoft Access, "password" is a keyword, use "[password]"
      

  7.   

    同意 思归 大侠的!!
    把password用[]括上