完全可以 调试通过 Private Sub Command1_Click() Dim RSAdd As New ADODB.Recordset Dim CONNAdd As New ADODB.Connection Dim SQL As String Dim DB As String
DB = "d:\db1.aaa" Dim newer As String newer = "张三" CONNAdd.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & DB SQL = "select * from students where name = '" & Trim(newer) & "'" RSAdd.Open SQL, CONNAdd, 1, 3 MsgBox RSAdd.RecordCount RSAdd.Close CONNAdd.Close End Sub
调试通过
Private Sub Command1_Click()
Dim RSAdd As New ADODB.Recordset
Dim CONNAdd As New ADODB.Connection
Dim SQL As String
Dim DB As String
DB = "d:\db1.aaa"
Dim newer As String
newer = "张三"
CONNAdd.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & DB
SQL = "select * from students where name = '" & Trim(newer) & "'"
RSAdd.Open SQL, CONNAdd, 1, 3
MsgBox RSAdd.RecordCount
RSAdd.Close
CONNAdd.Close
End Sub
在asp当中,就经常扩展名
如果你使用过asp
应该知道为了防止客户下载mdb文件
一般把后缀改为asp或者aspx
比如改成exe的文件头一样的标志,扩展名也是exe
你自己用的时候的恢复过来