Hi All,
I've been searching through this forum (very informative btw) and am hoping that someone can shed some light on a question I've been trying to answer for days...
The problem:
I'm trying to display records from an access database on an ASP page! However, I want the records to show as a total. eg is it possible to show how many closed calls someone has as a total? I'm thinking that I need to use a COUNT variable but I'm not too sure how to write the ADO to do it.. Here's what I have so far
<%
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open "\\server\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
%>
Please let me know if this is possible<%
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open "\\nsyd9004pap\c$\Inetpub\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 someone could point me in the right direction or advise if this is possible I would be most appreciative
Thanks
-Dave
I've been searching through this forum (very informative btw) and am hoping that someone can shed some light on a question I've been trying to answer for days...
The problem:
I'm trying to display records from an access database on an ASP page! However, I want the records to show as a total. eg is it possible to show how many closed calls someone has as a total? I'm thinking that I need to use a COUNT variable but I'm not too sure how to write the ADO to do it.. Here's what I have so far
<%
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open "\\server\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
%>
Please let me know if this is possible<%
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open "\\nsyd9004pap\c$\Inetpub\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 someone could point me in the right direction or advise if this is possible I would be most appreciative
Thanks
-Dave