can u help me regarding listview control in vb 6...
i want to use listview as datagrid..
i have 3 textboxes, and a list view with 3 coloums.
now when i enter data textboxs, it asks "do u want to add another data?"
when user enters so data, how much he want, and then he presses update button, the the whole data which is in listview, should b updates in database...
please, need help.
Jaseem Ahmed
2
Junior Poster
Recommended Answers
Jump to Postpost more info..
what kind of database? MSSQL Server, MySQL, Access??
3 columns? what are the name of your columns?
and where is your effort?? post your code that you've been work..
Jump to PostSo you mean to say what ever you enter in text boxes needs to be added into list view, right ?
and i think after 80 posts, you should understand that you need to show some effort to get any help here.
Jump to Postchange this part.
Private Sub CmdSave1_Click() Call Mydatacon Set rs = New ADODB.Recordset For i = 1 To ListView1.ListItems.Count Set rs = Nothing rs.Open "SELECT * from AAAAA_DEMO", Con, adOpenStatic, adLockOptimistic rs.AddNew rs!code = ListView1.ListItems(i).Text rs!descprtion = ListView1.ListItems(i).SubItems(1) rs!cooler = ListView1.ListItems(i).SubItems(2) rs!quan = ListView1.ListItems(i).SubItems(3) rs.Update Next i …
Jump to PostJust refresh the listview to show the newest records...
Listview1.Refresh
This AFTER adding the new record.:)
All 14 Replies
Jx_Man
987
Nearly a Senior Poster
Featured Poster
debasisdas
580
Posting Genius
Featured Poster
Jaseem Ahmed
commented:
ghatiya
+0
happygeek
commented:
agreed
+13
diafol
commented:
Noobs like JA deserve to get no help. Idiots who don't follow guidelines deserve to be told.
+9
Jaseem Ahmed
2
Junior Poster
Jaseem Ahmed
2
Junior Poster
debasisdas
commented:
misbehaving idiot.
-2
Jaseem Ahmed
2
Junior Poster
Jx_Man
987
Nearly a Senior Poster
Featured Poster
Jaseem Ahmed
2
Junior Poster
AndreRet
526
Senior Poster
Jaseem Ahmed
2
Junior Poster
Jx_Man
987
Nearly a Senior Poster
Featured Poster
Jaseem Ahmed
2
Junior Poster
Jx_Man
987
Nearly a Senior Poster
Featured Poster
Jaseem Ahmed
2
Junior Poster
peter_budo
2,532
Code tags enforcer
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.