Hi all,
I'm trying to display records from a MS Access DB in an ASP page (table).. I don't want to display all the records though, I just want to display the total of these records..i.e in my table I would like to show how many calls someone has closed this year..
Joe Bloggs ---> 100 Closed
Is this possible? I was thinking that I need to write an ADO that includes COUNT but I'm not too sure how to write this.. Here's what I have so far:
<%
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open "\\pathtoserver\gms_stats.mdb"
DIM mySQL, objRS
mySQL = "SELECT Count(*) AS intTotal FROM Closed_Remedy_2006 ORDER BY TechName"
Set objRS = Server.CreateObject("ADODB.Recordset")
objRS.Open recSQL, objConn
' Display result
Response.Write objRS("intTotal")
objRS.Close
Set objRS = Nothing
objConn.Close
Set objConn = Nothing
%>
If anyone could point me in the right direction or offer any advise on what I'm doing wrong, I would be very grateful
Thanks
-Dave
I'm trying to display records from a MS Access DB in an ASP page (table).. I don't want to display all the records though, I just want to display the total of these records..i.e in my table I would like to show how many calls someone has closed this year..
Joe Bloggs ---> 100 Closed
Is this possible? I was thinking that I need to write an ADO that includes COUNT but I'm not too sure how to write this.. Here's what I have so far:
<%
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open "\\pathtoserver\gms_stats.mdb"
DIM mySQL, objRS
mySQL = "SELECT Count(*) AS intTotal FROM Closed_Remedy_2006 ORDER BY TechName"
Set objRS = Server.CreateObject("ADODB.Recordset")
objRS.Open recSQL, objConn
' Display result
Response.Write objRS("intTotal")
objRS.Close
Set objRS = Nothing
objConn.Close
Set objConn = Nothing
%>
If anyone could point me in the right direction or offer any advise on what I'm doing wrong, I would be very grateful
Thanks
-Dave