|
-
Apr 28th, 2012, 07:48 PM
#1
Thread Starter
New Member
how to display select count result in listview
hi,
there is branches such A,B,C etc. Customers get authorization at this branches and such failed,success result status in my sql table .
i want display this informations sending from database to listview using vb6.
how can i display sql count result in listview ? (total of records at 3.column)
for example;
A success 120
A failed 30
B success 110
B failed 20
C success 120
C failed 30
codes:
With rs.ActiveConnection = cn
.Open "select branches , status, COUNT(*) from mytable where date between '20120410 15:00:00' and '20120411 16:00:00' group by branches,status order by branches,status"
Dim branches,status As String
Do While Not rs.EOF
BRANCHES= rs("BRANCHES")
STATUS= rs("STATUS")
Set list = ListView1.ListItems.Add(, , File)
list.SubItems(1) = branches
list.SubItems(2) = status
rs.MoveNext
Loop
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
|