|
-
Mar 14th, 2000, 10:00 AM
#1
Thread Starter
Junior Member
First i have create some headers, but i have problem when i want to put some data from a db to the column i want, especially the first column. Could anyone show me how? ThanX :þ
-
Mar 16th, 2000, 06:45 PM
#2
Addicted Member
Example (suppose you are working with ADO):
Dim RecSet As ADODB.Recordset,Counter As Integer
'After opening connection and recordset
RecSet.MoveFirst
For Counter=1 To RecSet.RecordCount
ListView1.ListItems.Add ,,RecSet("Field1").Value
ListView1.SubItems(1)=RecSet("Field2").Value
'and so on...
RecSet.MoveNext
Next Counter
Note that if the type of the field you need to put in the ListView is not Text, you need to turn the data to a string before adding it to the ListView.
Good Luck!!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|