VB6.0 对象访问数据库,运行是显示“未找到提供程序。该程序可能未安装”怎么办😱
PrivateSubForm_Activate()SetDataGrid1.DataSource=MyRsDataGrid1.RefreshEndSubPrivateSu...
Private Sub Form_Activate()
Set DataGrid1.DataSource = MyRs
DataGrid1.Refresh
End Sub
Private Sub Form_Load()
Dim Mycon As New ADODB.Connection
Dim MyRs As New ADODB.Recordset
Mycon.ConnectionString = "Provider=Microsoft.ACE.OLBD.12.0;" & _
"Date Source=C:\Users\Jachin\Documents\student1.accdb;Persist Security Info=false"
Mycon.Open
End Sub
Private Sub Form_Unload(Cancel As Integer)
Set DataGrid1.DataSource = Nothing
MyRs.Close
End Sub 展开
Set DataGrid1.DataSource = MyRs
DataGrid1.Refresh
End Sub
Private Sub Form_Load()
Dim Mycon As New ADODB.Connection
Dim MyRs As New ADODB.Recordset
Mycon.ConnectionString = "Provider=Microsoft.ACE.OLBD.12.0;" & _
"Date Source=C:\Users\Jachin\Documents\student1.accdb;Persist Security Info=false"
Mycon.Open
End Sub
Private Sub Form_Unload(Cancel As Integer)
Set DataGrid1.DataSource = Nothing
MyRs.Close
End Sub 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |