cleith
Programmer
- Sep 27, 2002
- 22
Hi,
I am trying to display 22,770 records in a bound grid.
The flex grid displays all fields and records. TDBGrid shows nothing.
The process takes 70-80 seconds. I was hoping the TDBGrid would display dynamically as rows need to be displayed. In MAS 90 the grid is populated almost immediately.
Both are set to bound mode. Can anyone see what is wrong here.
MAS 90 3.21
MAS 90 32-Bit ODBC Driver 3.00.00.00 Sage Canada
(from 3.4 install that my client hasn't installed yet)
VB6 VSFlexGrid7 True DataGrid 7
Just experimenting to see if I can read the MAS90 db. Seems I can but need to resolve this before pursuing the client's request.
Thanks,
Charles
Option Explicit
Option Base 0
Private cn As New ADODB.Connection
Private rs As New ADODB.Recordset
Private Sub Form_Activate()
Dim i%, aWorkOrder As Variant
cn.Open "Driver={MAS 90 32-Bit ODBC Driver};Directory=f:\MAS90\;UID=UID;PWD=Password;Company=Company"
Debug.Print Time
rs.Open "Select * From WO1_WorkOrderMaster", cn
Set VSFlexGrid7.DataSource = rs
Set TDBGrid1.DataSource = rs
Debug.Print Time
End Sub
Private Sub Form_Unload(Cancel As Integer)
rs.Close
Set rs = Nothing
cn.Close
Set cn = Nothing
End Sub
I am trying to display 22,770 records in a bound grid.
The flex grid displays all fields and records. TDBGrid shows nothing.
The process takes 70-80 seconds. I was hoping the TDBGrid would display dynamically as rows need to be displayed. In MAS 90 the grid is populated almost immediately.
Both are set to bound mode. Can anyone see what is wrong here.
MAS 90 3.21
MAS 90 32-Bit ODBC Driver 3.00.00.00 Sage Canada
(from 3.4 install that my client hasn't installed yet)
VB6 VSFlexGrid7 True DataGrid 7
Just experimenting to see if I can read the MAS90 db. Seems I can but need to resolve this before pursuing the client's request.
Thanks,
Charles
Option Explicit
Option Base 0
Private cn As New ADODB.Connection
Private rs As New ADODB.Recordset
Private Sub Form_Activate()
Dim i%, aWorkOrder As Variant
cn.Open "Driver={MAS 90 32-Bit ODBC Driver};Directory=f:\MAS90\;UID=UID;PWD=Password;Company=Company"
Debug.Print Time
rs.Open "Select * From WO1_WorkOrderMaster", cn
Set VSFlexGrid7.DataSource = rs
Set TDBGrid1.DataSource = rs
Debug.Print Time
End Sub
Private Sub Form_Unload(Cancel As Integer)
rs.Close
Set rs = Nothing
cn.Close
Set cn = Nothing
End Sub