mc 黄金 普色 套:我是鸟 谁帮我看看这个程序为什么不能运行
来源:百度文库 编辑:高校问答 时间:2024/04/28 00:14:46
Private Sub Form_Load()
Private CONN As Adodb.Connection '定义ADO CONNECTION对象
Private RS As Adodb.Recordset '定义ADO RECORDSET对象
Set CONN = New Adodb.Connection
CONN.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\jj\ADO.eg;Persist Security Info=False"
CONN.Open
Set RS = New Adodb.Recordset
With RS Do
ActiveConnection = CONN
CursorType = adOpenDynamic
LockType = adLockOptimistic
End With
Set RS = Nothing
CONN.Close
Set CONN = Nothing
End Sub
Private CONN As Adodb.Connection '定义ADO CONNECTION对象
Private RS As Adodb.Recordset '定义ADO RECORDSET对象
Set CONN = New Adodb.Connection
CONN.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\jj\ADO.eg;Persist Security Info=False"
CONN.Open
Set RS = New Adodb.Recordset
With RS Do
ActiveConnection = CONN
CursorType = adOpenDynamic
LockType = adLockOptimistic
End With
Set RS = Nothing
CONN.Close
Set CONN = Nothing
End Sub
这这不是是一些连接数据库的语句,已经运行了,只是你看不到
conn.open()