vb如何打开带有密码的MDB文件
FunctionConnection()AsStringConnection="Provider=Microsoft.Jet.OLEDB.4.0;DataSource="...
Function Connection() As String
Connection = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path + "\phone.mdb"
End Function
Private Sub cx_Click()
On Error GoTo err:
a.Text = ""
Dim gw As Double
Dim CNN As New ADODB.Connection
Dim RST As New ADODB.Recordset
Dim Stpath, strSQL As String
Dim RLD As ADODB.Field
Stpath = App.Path + "\phone.mdb"
CNN.Open "provider=Microsoft.jet.OLEDB.4.0;data source=" & Stpath
strSQL = "Select * from 电话身份证 WHERE pp LIKE '" & c.Text & "'"
RST.Open strSQL, CNN
a.Text = RST.Fields("dd")
Clipboard.Clear
Clipboard.SetText "" & a.Text & ""
Exit Sub
err: MsgBox "无此记录!", , "错误"
End Sub
如果phone.mdb带有123的密码时代码怎么改啊?
psw=123,加了以后还是不行 展开
Connection = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path + "\phone.mdb"
End Function
Private Sub cx_Click()
On Error GoTo err:
a.Text = ""
Dim gw As Double
Dim CNN As New ADODB.Connection
Dim RST As New ADODB.Recordset
Dim Stpath, strSQL As String
Dim RLD As ADODB.Field
Stpath = App.Path + "\phone.mdb"
CNN.Open "provider=Microsoft.jet.OLEDB.4.0;data source=" & Stpath
strSQL = "Select * from 电话身份证 WHERE pp LIKE '" & c.Text & "'"
RST.Open strSQL, CNN
a.Text = RST.Fields("dd")
Clipboard.Clear
Clipboard.SetText "" & a.Text & ""
Exit Sub
err: MsgBox "无此记录!", , "错误"
End Sub
如果phone.mdb带有123的密码时代码怎么改啊?
psw=123,加了以后还是不行 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询