Can anyone please tell me how do I get the total row in my ms access table and put in my label.text at vb.net?
qhadjirul
0
Newbie Poster
Recommended Answers
Jump to PostThis is how I did it.
Sub countR() ConnDB() Dim sql As String = "select COUNT (*) FROM register" Dim cmd As New OleDbCommand(sql, conn) dr = cmd.ExecuteReader() While (dr.Read()) lblTotalR.Text = (dr(0).Tostring()) End While End Sub
All 2 Replies
Mr.M
58
Future Programmers
Tafadzwa_3
commented:
Where is dr declared and how do you delcare dr
+0
qhadjirul
0
Newbie 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.