JohnnyPolite
MIS
Hello,
I open a recordset in a classic ASP page with this code:
Later on, I try to dictate the HTML that is produced on the page by using:
From there I have a block of HTML. Later on in the code I have an "ELSE" which lets the user no there if there is no record found.
When I run the page, I receive the error:
"Object doesn't support this property or method: 'Count'"
Can anyone tell me what I am doing wrong? I have used the rs.count property many times in VBA and I was pretty sure I could use it in ASP VBScript. I am still a fledgling newbie, so I may be mistaken.
Thanks alot in advance for any help.
-JP
I open a recordset in a classic ASP page with this code:
Code:
<%
Dim rsLogin__MMColParam
rsLogin__MMColParam = "a"
If (Session("TeachID") <> "") Then
rsLogin__MMColParam = Session("TeachID")
End If
%>
<%
Dim rsLogin
Dim rsLogin_numRows
Set rsLogin = Server.CreateObject("ADODB.Recordset")
rsLogin.ActiveConnection = MM_Application_STRING
rsLogin.Source = "SELECT StuID, FullName FROM qryWebLogin WHERE TeachID = '" + Replace(rsLogin__MMColParam, "'", "''") + "' AND Passwd = '" + Replace(rsLogin__MMColParam2, "'", "''") + "'"
rsLogin.CursorType = 0
rsLogin.CursorLocation = 2
rsLogin.LockType = 1
rsLogin.Open()
rsLogin_numRows = 0
%>
Later on, I try to dictate the HTML that is produced on the page by using:
Code:
IF rsLogin.Count > 0 THEN
From there I have a block of HTML. Later on in the code I have an "ELSE" which lets the user no there if there is no record found.
When I run the page, I receive the error:
"Object doesn't support this property or method: 'Count'"
Can anyone tell me what I am doing wrong? I have used the rs.count property many times in VBA and I was pretty sure I could use it in ASP VBScript. I am still a fledgling newbie, so I may be mistaken.
Thanks alot in advance for any help.
-JP