Adodc1.Refresh Set Adodc1.Recordset = Rst End Sub Private Sub Form_Load() i = 0 CnnStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _ App.Path & "\2003.mdb;Persist Security Info=False" RstStr = "Select * from tUsers order by sCardID desc " End Sub
没有哪个控件能自己保存到数据库中,还需要你写代码!
下面的代码你自己挑有用的吧
Private Sub Command2_Click()
' Rst.MoveFirst
' Rst.Move (2)
' Rst.Fields(2).Value = "Week"
' Rst.Update
' Adodc1.Refresh
' Set Adodc1.Recordset = Rst
' Rst.Book = vBookMark
' Set Adodc1.Recordset = Rst
' Debug.Print Rst.Fields(0)
' Debug.Print Adodc1.Recordset.Fields(0)
' Rst.Sort = "sCardID desc"
' Set Adodc1.Recordset = Rst
' Adodc1.Refresh' Rst.MoveFirst
' Rst.Find "sCardID='210000084326'"
' Rst.Delete
'' Rst.Update
'' Set Adodc1.Recordset = Null
'' Set Adodc1.Recordset = Rst
' Adodc1.Refresh
' Set Adodc1.Recordset = Rst'MsgBox Rst.Supports(adUpdateBatch)
Rst.MoveFirst
Cnn.BeginTrans
Rst.Fields(1).Value = "王垃圾"
Rst.Fields(2).Value = Null
Rst.Update
Adodc1.Refresh
Set Adodc1.Recordset = Rst
End Sub
Private Sub Form_Load()
i = 0
CnnStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
App.Path & "\2003.mdb;Persist Security Info=False"
RstStr = "Select * from tUsers order by sCardID desc "
End Sub