vb如何向ACESS数据库填写数据.

来源:百度知道 编辑:UC知道 时间:2024/05/10 19:06:30
如RS!BB=TEXT1.TEXT

Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\HXMdi.mdb;Persist Security Info=False"
Adodc1.RecordSource = "Select * from jilu_sj"
Adodc1.Refresh
Adodc1.Recordset.AddNew
Adodc1.Recordset(0) = shiyan_sj(0)
Adodc1.Recordset(1) = Mid(Date$, 3, 2) & Mid(Date$, 6, 2) & Mid(Date$, 9, 2) & "-" & Time$ 'Mid(Time$, 1, 2) & Mid(Time$, 4, 2) & Mid(Time$, 7, 2) '记录time
Adodc1.Recordset(2) = Val(Label3(0).Caption) '记录数据
Adodc1.Recordset(3) = Val(Label3(1).Caption) '记录数据
Adodc1.Recordset.Update

引用ActiveX Data Object库后即可使用

dim conn as new connection
dim rs as new recordset