Function Cant()
Dim cnview As New ADODB.connection
Dim rsview As New ADODB.Recordset
Call connection(cnview, App.Path & "\Commissions.mdb", "endromida")
Call Recordset(rsview, cnview, "SELECT * FROM Commi_Cus")
'If txtShaha = ("Commi_Cus" ,"Sha_no") Then
'txtCou = Sha_no + 1
' End If
End Function
rasheedraj
-3
Newbie Poster
Recommended Answers
Jump to PostSample ADO using MS SQL and copying data to a listview. Change the connection string for access.
Dim con As New ADODB.Connection Dim rec As New ADODB.Recordset con.Open("Driver={SQL Server};Server=.\SQLEXPRESS;Database=PUBS;Trusted_Connection=yes;") rec.Open("SELECT au_lname,au_fname,zip FROM authors", con, CursorTypeEnum.adOpenStatic) Do Until rec.EOF ListView1.Items.Add(New ListViewItem({rec("au_lname").Value, rec("au_fname").Value, rec("zip").Value})) rec.MoveNext() Loop rec.Close() con.Close()
Jump to PostIs there a question? I've seen some of your other posts and you seem to think that we are willing and able to answer questions that you can't be bothered to ask based on information that you can't be bothered to provide.
Jump to PostYour query would be
"SELECT COUNT(*) AS numRecords FROM Commi_Cus"
and you can copy the value to a textbox by
txtNumRecords.Text = rec("numRecords").Value
Jump to PostI repeat, is there a question?
All 14 Replies
Reverend Jim
4,780
Hi, I'm Jim, one of DaniWeb's moderators.
Moderator
Featured Poster
rasheedraj
-3
Newbie Poster
Reverend Jim
4,780
Hi, I'm Jim, one of DaniWeb's moderators.
Moderator
Featured Poster
rasheedraj
-3
Newbie Poster
Reverend Jim
4,780
Hi, I'm Jim, one of DaniWeb's moderators.
Moderator
Featured Poster
rasheedraj
-3
Newbie Poster
Reverend Jim
4,780
Hi, I'm Jim, one of DaniWeb's moderators.
Moderator
Featured Poster
rasheedraj
-3
Newbie Poster
Reverend Jim
4,780
Hi, I'm Jim, one of DaniWeb's moderators.
Moderator
Featured Poster
rasheedraj
-3
Newbie Poster
Reverend Jim
4,780
Hi, I'm Jim, one of DaniWeb's moderators.
Moderator
Featured Poster
rasheedraj
-3
Newbie Poster
Reverend Jim
commented:
Lazy.
-3
Reverend Jim
4,780
Hi, I'm Jim, one of DaniWeb's moderators.
Moderator
Featured Poster
rasheedraj
-3
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.