I'm trying to get a record count of all the records in each table, then display it next to each table name (which corresponds to each category)
As of now I have :
<%
dim rs, oConn, tSQL
Set rs = Server.CreateObject("ADODB.Recordset"
Set oConn = Server.CreateObject("ADODB.Connection"
oConn.Open "DSN=uploadsn"
'aftermarket
tSQL="SELECT Count(*) AS TOTAL_AFTRMKT FROM AFTERMARKET;"
'customerservice
tSQL = "SELECT COUNT(*) AS TOTAL_CS FROM CUSTOMER_SERVICE;"
RS.Open tSQL, oConn
oConn.Execute tSQL
set oConn = nothing
Then, later on in the body of the document, I reference each query and write the total number of records in each table:
Aftermarket (<% Response.Write(rs("TOTAL_AFTRMKT ")%>)
Cust. Service (<% Response.Write(rs("TOTAL_CS")%>)
But, this is not working for some reason.
Any info on this will be greatly appreciated. Thanks in advance.
As of now I have :
<%
dim rs, oConn, tSQL
Set rs = Server.CreateObject("ADODB.Recordset"
Set oConn = Server.CreateObject("ADODB.Connection"
oConn.Open "DSN=uploadsn"
'aftermarket
tSQL="SELECT Count(*) AS TOTAL_AFTRMKT FROM AFTERMARKET;"
'customerservice
tSQL = "SELECT COUNT(*) AS TOTAL_CS FROM CUSTOMER_SERVICE;"
RS.Open tSQL, oConn
oConn.Execute tSQL
set oConn = nothing
Then, later on in the body of the document, I reference each query and write the total number of records in each table:
Aftermarket (<% Response.Write(rs("TOTAL_AFTRMKT ")%>)
Cust. Service (<% Response.Write(rs("TOTAL_CS")%>)
But, this is not working for some reason.
Any info on this will be greatly appreciated. Thanks in advance.