Hi,
I hope this is a reasonably quick/easy question, and apologize for not having the patience to find the answer (which likely exists out there).
I want a SIMPLE way to show a table in Visual Basic 6 and fill it with data programmatically. I do NOT want to have to create a database file, etc.
In a quick sample code I would like:
dim data as recordset ' or whatever type I need
data.field.add("Column 1", string)
data.field.add("Column 2", string)
' add my data from other places in my program
for i=1 to totalRows
data.addRow(myData(1,i), myData(2,i)
next
' then, with a 'datagrid' control I add in design time
set datagrid.datasource = data
and expec that this will show the data in the grid. As much as I've tried, I can't find a way to "open" a recordset which does not require me to open an existing file and connect to a database engine.
(Really, what I want to do, is to easily display a two dimensional array in a quick graphical way, ideally I could just say
datagrid1.data = arrayNbyM
and show it)
Thank you!
ASKER