Hi, following VB6+Access code was working fine, but today it not works: DataGrid just empty!
Private Sub Command1_Click()
Dim oConnection As New ADODB.Connection, oRecordset As New ADODB.Recordset
oConnection.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "/dFile.mdb"
oRecordset.CursorLocation = adUseClient
oRecordset.Open "Select * from table1", oConnection
Print oRecordset.Fields(1) 'can get text here
Set DataGrid1.DataSource = oRecordset 'datagrid1 just empty
End Sub
Thanks a lot for your suggestions.
Private Sub Command1_Click()
Dim oConnection As New ADODB.Connection, oRecordset As New ADODB.Recordset
oConnection.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "/dFile.mdb"
oRecordset.CursorLocation = adUseClient
oRecordset.Open "Select * from table1", oConnection
Print oRecordset.Fields(1) 'can get text here
Set DataGrid1.DataSource = oRecordset 'datagrid1 just empty
End Sub
Thanks a lot for your suggestions.