I M BEGINNER IN ASP
I WANT TO RETURN TOTAL RECORDS FROM A TABLE.
THERE ARE TWO FORMS CLASS1.ASP AND CLASS2.ASP
THROUGH FIRST FORM I JUST POST THE NAME OF TABLE
SO I M WRITING THE CODE OF CLASS2.ASP
<!--#Include File = "Include/iecon.inc"-->
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR " content="Micros oft FrontPage 5.0">
<meta name="ProgId" content="FrontP age.Editor.Docu ment">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<title>New Page 1</title>
</head>
<body>
<%
dim rs,rs1
class AddNum
public function showRecordCount ()
tbl = Request.Form("t xtTbl")
rs = con.execute("se lect count(*) from "&tbl)
end function
public function returnRS
tbl = Request.Form("t xtTbl")
rs1 = con.execute("se lect * from "&tbl)
end function
end class
dim obj
set obj = new AddNum
obj.showRecordC ount
Response.write( "<br>")
Response.write ("Total Record is " & rs(0))
%>
<div align="left">
<table border="1" cellpadding="0" cellspacing="0" style="border-
collapse: collapse" bordercolor="#1 11111" width="248" height="52"
id="AutoNumber1 ">
<tr>
<td width="114" height="52">Add ition Of Two Number using Object</
td>
<td width="128" height="52"><in put type = text name = txtAdd
size="20" value = <%=a%>></td>
</tr>
</table>
</div>
<table border="1" cellpadding="0" cellspacing="0" style="border-
collapse: collapse" bordercolor="#1 11111" width="48%"
id="AutoNumber2 ">
<tr>
<td width="33%">Col umn1 </td>
<td width="33%">Col umn2</td>
<td width="34%">Col umn3</td>
</tr>
<%
obj.returnRS
if not rs1.eof then '/*********LINE NO 66 *************** **/
while not rs1.eof
%>
<tr>
<td width="33%"><%= rs1(0)% </td>
<td width="33%"><%= rs1(1)% </td>
<td width="34%"><%= rs1(2)% </td>
</tr>
<%
rs1.movenext
wend
end if
%>
</table>
</body>
</html>
MY ERROR IS
Error Type:
Microsoft VBScript runtime (0x800A01B6)
Object doesn't support this property or method: 'eof'
/vkasp/aspClass/class2.asp, line 66
BUT WHEN I COMMENT THE IF AND WHILE LOOP PROCEDURE IT GIVES THE FIRST
RECORD BUT I WANT ALL RECORD FROM TABLE.
WHAT IS PROBLEM
PLEASE HELP ME
THANKS