rsde.Open "insert into logindetails(idnumber,password,photoicon,roletype,shift) values('" & t_id.Text & "','999','0','" & t_role.Text & "','1')", cnn, adOpenStatic, adLockOptimistic

解决方案 »

  1.   

    要写成这样.
    cnn.Execute  "insert into logindetails(idnumber,password,photoicon,roletype,shift) values('" & t_id.Text & "','999','0','" & t_role.Text & "','1')"
      

  2.   

    idnumber 是否 自增長字段?如是的話不需給它賦值.
    另insert/update/delete 語句最好使用 cnn.Execute statement
      

  3.   

    cnn.Execute  "insert into logindetails([idnumber],[password],photoicon,roletype,[shift]) values('" & t_id.Text & "','999','0','" & t_role.Text & "','1')"'这样来
      

  4.   

    那个password作字段名时要用[]括起来.因为它有可能是VB的关键字,
    所以建议楼主不要用password或user这个名称来做字段名