Fill datagrid from stored procedure without using recordset (SQLServer 7 / VB6)
Posted on 2004-04-19
I wrote a VB6 application, which reads data from a SQLServer 7 database into a datagrid. Some columns are updated by the user and written back to the DB.
I fill the datagrid in the following way:
sql = "Select..."
Set rec = New Recordset
rec.CursorLocation = adUseClient
rec.Open sql, DataEnvironment1.Connection1, adOpenStatic, adLockOptimistic
Set DataGrid1.dataSource = rec
The Win2K clients are connected to the database server via a 256KB line. Current response times are 1-3 seconds for standard queries, but can go up to half a minute. I would like to speed up the application and fill the datagrid straight from a SP without using a recordset (similar to SQLAdapter in .NET). Does anybody know how to do this?