ASP VBScript ADO Recordset RecordCount
Given this code...
Code:
<% @Language="VBScript" %>
<%
Option Explicit
%>
<!---#include virtual="/Gabby/Utilities.inc"-->
<!---#include virtual="/Gabby/Globals.inc"-->
<%
Dim adodbConn, adodbRS
Dim strSQL
Set adodbConn = Server.CreateObject("ADODB.Connection")
Set adodbRS = Server.CreateObject("ADODB.Recordset")
adodbConn.Open MonitorCS, MonitorUserID, MonitorPassword
strSQL = "SELECT Node FROM Node"
adodbRS.Open strSQL, adodbConn, adOpenForwardOnly, adLockReadOnly
%>
<html>
<head>
<title>Test Page</title>
</head>
<body>
<p><%=adodbRS.RecordCount%></p>
<%While Not adodbRS.EOF%>
<p><%=adodbRS.Fields("Node").Value%></p>
<%adodbRS.MoveNext%>
<%Wend%>
</body>
</html>
I get this result...
Code:
-1
CICS-Region-1
CICS-Region-2
CICS-Region-3
localhost
NT-BackOffice-Server
Unix-DB-Server
Unix-DB-Server
Unix-DB-Server
UnixGateway
UnixGateway2
Since ADODBRecordset.RecordCount obviously doesn't work, is there any other way?