module3.bas
来自「简单的通讯薄 名字=文件名=此列为文件名 QQ=验证码=此列为验证码 电话」· BAS 代码 · 共 41 行
BAS
41 行
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("验证码").Value = value3
RSEMail.Fields("访问次数").Value = value4
RSEMail.Fields("状态").Value = value2
RSEMail.Update
RSEMail.Close
Set RSEMail = Nothing
'ado1.ConnectionString = AppPath
'ado控件使用SQL命令,GET数据源数据
'SQLNow = "insert into info values(ID=" & Counter & ",名字='" & Trim(Text5.Text) & "',资料='" & Trim(Text6.Text) & "')"
'ado1.ConnectionString = AppPath
'ado控件使用SQL命令,GET数据源数据
'ado1.RecordSource = SQLNow
MsgBox "资料添加成功!", vbInformation, "资料添加成功"
Form2.Show
End Function
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?