?? module3.bas
字號(hào):
Attribute VB_Name = "Module3"
Public Function InsertFunction()
Dim datacount As Integer
Set DBEmail = OpenDatabase(AppP & "data.mdb", ture, ture, ";Pwd=lyttlyqjhqjw ")
Set RSEMail = DBEmail.OpenRecordset("select ID from info order by ID", dbOpenDynaset, dbSeeChanges, dbOptimistic)
RSEMail.MoveLast
counter = RSEMail.Fields("ID").Value + 1
datacount = RSEMail.RecordCount
Set RSEMail = DBEmail.OpenRecordset("select * from info", dbOpenDynaset, dbSeeChanges, dbOptimistic)
RSEMail.AddNew
RSEMail.Fields("ID").Value = counter
RSEMail.Fields("文件名").Value = value1
RSEMail.Fields("驗(yàn)證碼").Value = value3
RSEMail.Fields("訪問次數(shù)").Value = value4
RSEMail.Fields("狀態(tài)").Value = value2
RSEMail.Update
RSEMail.Close
Set RSEMail = Nothing
'ado1.ConnectionString = AppPath
'ado控件使用SQL命令,GET數(shù)據(jù)源數(shù)據(jù)
'SQLNow = "insert into info values(ID=" & Counter & ",名字='" & Trim(Text5.Text) & "',資料='" & Trim(Text6.Text) & "')"
'ado1.ConnectionString = AppPath
'ado控件使用SQL命令,GET數(shù)據(jù)源數(shù)據(jù)
'ado1.RecordSource = SQLNow
MsgBox "資料添加成功!", vbInformation, "資料添加成功"
Form2.Show
End Function
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -