如题所述
给你个Access的例子(很早之前写的,现在好久没用过按键了):
Ret = Plugin.Access.Connect(path,"")
If RET = true Then
Form1.短信1.Text="连接数据库成功"
原ID = Plugin.Access.SelectData("MSG_Inbox", "max(ID)", "MMSUrl='" & num & "'")
Do
新ID = Plugin.Access.SelectData("MSG_Inbox", "max(ID)", "MMSUrl='" & num & "'")
If 新ID = 原ID Then
Delay 5000
Else
Form1.短信老.Text=Form1.短信老.Text&"提取前"&新ID&VBCrLf
新ID = Lib.算法.提取字串符中所有数字(新ID)
Form1.短信老.Text=Form1.短信老.Text&"提取后"&新ID&VBCrLf
yzm = Plugin.Access.SelectData("MSG_Inbox", "MsgTitle","ID="&新ID)
If instr(yzm,"百度")>0 Then
Form1.短信1.Text=yzm
Exit Do
Else
Form1.短信1.Text="【获取到不是来自百度的短信???】"&VBCrLf&yzm
Exit Do
End If
End If
Loop
Ret = Plugin.Access.Close()
End If
Ret = Plugin.Access.Connect(path,"")
If RET = true Then
Form1.短信1.Text="连接数据库成功"
原ID = Plugin.Access.SelectData("MSG_Inbox", "max(ID)", "MMSUrl='" & num & "'")
Do
新ID = Plugin.Access.SelectData("MSG_Inbox", "max(ID)", "MMSUrl='" & num & "'")
If 新ID = 原ID Then
Delay 5000
Else
Form1.短信老.Text=Form1.短信老.Text&"提取前"&新ID&VBCrLf
新ID = Lib.算法.提取字串符中所有数字(新ID)
Form1.短信老.Text=Form1.短信老.Text&"提取后"&新ID&VBCrLf
yzm = Plugin.Access.SelectData("MSG_Inbox", "MsgTitle","ID="&新ID)
If instr(yzm,"百度")>0 Then
Form1.短信1.Text=yzm
Exit Do
Else
Form1.短信1.Text="【获取到不是来自百度的短信???】"&VBCrLf&yzm
Exit Do
End If
End If
Loop
Ret = Plugin.Access.Close()
End If
温馨提示:答案为网友推荐,仅供参考
第1个回答 2019-06-23
贾成地勇星