Re: VB6 to VB .Net listview
Two things:
1. Don't use ADODB.
2. Don't use a ListView.
We're not in VB6 any more Toto! Use ADO.NET and populate a DataTable using a data adapter and then bind that DataTable to a DataGridView. Follow the CodeBank link in my signature and check out my thread on Retrieving & Saving Data for example code on populating the DataTable. As for binding, it's a one-liner:
vb.net Code:
myDataGridView.DataSource = myDataTable
That will create all the columns and all the rows automatically. If you need something other than the default behaviour then you can create some or all of the columns in the designer and then still use that one line of code.
Re: VB6 to VB .Net listview
ahm can i know why u advice not to use listview? i find it very functional and flexible in VB6 and i believe it still has its capabilities in .NET
Re: VB6 to VB .Net listview
The ListView is not a proper grid control. If you are not using ListView-specific features, i.e. multiple views or grouping, then the ListView is generally a poor choice for tabular data. The DataGridView is a proper grid control and is far more functional and flexible than a ListView for displaying tabular data. For a start it supports data-binding, plus it has several in-built column types and allows you to create your own to display and edit data any way you want.