Question:

I'm using Visual Basic 6.0 and I got some issues I'd like clarified. I hope u can help.?

by  |  earlier

0 LIKES UnLike

Right, I want to use the ListView control in my application. I'd like it to be able to connect to a simple database project, eg, a contact management program. I'd like you to help me out coz it's really stressing me out.

Thanks in advance

 Tags:

   Report

2 ANSWERS


  1. The ListView isn't a databound control. For that, you'll need the MSFlexGrid/MSHFlexGrid or DataGrid controls, or the dataRepeater control with a custom control.

    To get a ListView to show data from a database, you'll need to gather the data into an Array or RecordSet (using the Activex Data Objects (ADO)), and populate the control by iterating through the retrieved information.

    The problem is: if you don't know how to use the ListView to begin with, filling it with data from a database will be... pretty d**n near impossible without some examples that show you how to populate the control (using the "key" and "index" options, and "subitems" correctly).

    There's tons of code examples out there on the web - simply do a search for "Visual Basic -".net" listview recordset", and see what the codes all do to get a handle on it.

    (BTW: The -".net" in the search string is including the quotes, and prevents you from getting all types of examples that don't work in VB6)


  2. If you post or e-mail the code that you have so far I can help you.

Question Stats

Latest activity: earlier.
This question has 2 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.