What I think zemp[b is referring to is the Flex Grid, which most seem to be using here. You have mentioned the use of the DataGrid.
You can have the FlexHGrid load automatically (It just will not be bound afterwards - good! most will say)
The MSHFlexGrid (OLEDB only) has a recordset property and a Datasource property which can be used to automatically fill the grid with data. (Set MSHFlexGrid1.Recordset = rsADO)
But, best is probably like zemp has mentioned if you have (or may have someday) alot of records. Then you can control how many records actually get loaded if you want, in order to speed things up, and then fetch more records as you go along.
Another advantage of using the FlexHGrid is that you can fill the grid with data in one line of code using a Server Side cursor. A DataGrid needs a Client side cursor.
And, with the MSHFlex you can create Bands.
Using the DataGrid has also it's advantages. You can load the data from a recordset that has been opened with using the adAsyncFetch method. You can also edit data directly in the DataGrid, affection the fields in the underlying recordset directly (bound in other words, but using a disconnected recordset will give that control back) The lack of formating cells and rows with different colors are one of the dis-advantages.
>populate a datagrid at runtime frm a ADODB recordset
Build the recordset, using a client side cursor for a DataGrid, and just add:
Set DataGrid1.DataSource = rsMyRecordset [/i][/u]*******************************************************
General remarks:
If this post contains any suggestions for the use or distribution of code, components or files of any sort, it is still your responsibility to assure that you have the proper license and distribution rights to do so!