dim cn as new adodb.connection
mysql=insert into new(a,b,c) values(1,2,3)
cn execute mysql

解决方案 »

  1.   

    dim cnn as new adodb.connectioncnn.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=yourDB.mdb; Persist Security Info=False"
    cnn.execute "create table new (X long, A long, B long, C Long)"
    cnn.execute "insert into new (A, B, C) values(0, 0, 0)"
    cnn.execute "insert into new (A, B, C) values(0, 0, 0)"
    cnn.execute "insert into new (A, B, C) values(" & val(text1) & "," & val(text2) & "," & val(text3) ")"
      

  2.   

    我责么调试时说用户类型未建立,我 的 MDB与工程再同一目录,请给予帮助
    !另外怎样删除当前COMBO中的元素(COMBO.REMOVEITEM?)XIE
      

  3.   

    Dim DB As Database
    Set DB=Opendatabase(App.path & "\Mydb.mdb")
    DB.Execute "Create Table new(X Integer, A Integer, B Integer, C Integer)"
    DB.Execute "Insert Into new (A, B, C) values(0, 0, 0)"
    DB.Execute "Insert Into new (A, B, C) values(0, 0, 0)"
    DB.Execute "Insert Into new (A, B, C) values(" & val(text1) & "," & val(text2) & "," & val(text3) ")"
    DB.Close
      

  4.   

    删除当前COMBO中的元素:
    Combo1.RemoveItem Combo1.ListIndex
      

  5.   

    DB.Execute "Insert Into new (A, B, C) values(" & val(text1) & "," & val(text2) & "," & val(text3) ")"
    我在VB中调试不通过,这句不对嘛!Combo1.RemoveItem Combo1.ListIndex也不对!参数也不对!还有我想在以有的表中插入数据怎么办?请指教!