Custom populate ListView from mySQL DB
Posted on 2005-05-13
I am trying to do a custom Listview Population code.
I am using a setting.ini file to set the names of the columnheaders and I need to also set in the ini file what fieldnames to go with those
Column headers is very easy:
For ggr = 1 To ReadINI("Datagrid", "headers", App.Path + "\settings.ini")
lvRecs.ColumnHeaders.Add ggr, , ReadINI("Datagrid", CStr(ggr), App.Path + "\settings.ini")
this populates the colimn headers on the ListView.
I want to now :
How do I automate the:
lvRecs.ListItems.Add , , Str(rsClients.Fields!UserId) <-
so when adding another field in the database, all I have to do is alter the settings.ini with the new field.
Using a datagrid would solve the problem but adodc and datagrid are way to buggy for me,
they work and crash now and then so they are not reliable at all.
Alternatively, do you know another listview/datagrid/something that works better than adodc+datagrid.