hi I was wondering if some could please help me with this.
I am trying to retrieve a count of how many records are in the table. so i would do a sql statement and executing and then pull the value into the textbox, unfortunately it does not do that. thanks in advance
============================================================
Private Sub TotalPartners()
Dim strConnect As String
Dim rsTotal As Recordset
Dim strSQL As String
Set gcnAP = New Connection
Set rsTotal = New Recordset
If bTestProd = True Then
strSQL = "SELECT COUNT (*) FROM registuser"
Else
strSQL = "SELECT COUNT (*) FROM registuser_pro"
End If
strConnect = "provider sqloledb;server=hqsql02;database=edi;uid=" & struid &";pwd="&strpwd
rsTotal.Open strSQL, strConnect, adOpenKeyset,
adLockOptimistic, adCmdText
txtTotal.Text = rsTotal
End Sub
I am trying to retrieve a count of how many records are in the table. so i would do a sql statement and executing and then pull the value into the textbox, unfortunately it does not do that. thanks in advance
============================================================
Private Sub TotalPartners()
Dim strConnect As String
Dim rsTotal As Recordset
Dim strSQL As String
Set gcnAP = New Connection
Set rsTotal = New Recordset
If bTestProd = True Then
strSQL = "SELECT COUNT (*) FROM registuser"
Else
strSQL = "SELECT COUNT (*) FROM registuser_pro"
End If
strConnect = "provider sqloledb;server=hqsql02;database=edi;uid=" & struid &";pwd="&strpwd
rsTotal.Open strSQL, strConnect, adOpenKeyset,
adLockOptimistic, adCmdText
txtTotal.Text = rsTotal
End Sub