Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: : Operation not allowed when object is closed


Message #1 by "varun" <varun25@y...> on Thu, 21 Sep 2000 02:59:37 +0100
Hi,

When i'm testing my application the asp scripts work up to a point

where when i'm verifying user name and password i get an asp script error

"operation not allowed when object is closed"

Can help me?

email me varun25@y...



here's the code







<!--#include file="conNthWind.asp" --><%



' Checking the id and the password entered in Welcome.asp



Response.ContentType = "text/vnd.wap.wml"



Dim sSQL, iId, sPwd, rsEmployees



iId = Request("Id")

sPwd = Request("Pwd")



sSQL = " SELECT Employees.EmployeeID, Employees.FirstName,

Employees.LastName"

sSQL = sSQL & " FROM Employees"

sSQL = sSQL & " WHERE EmployeeID=" & iId

sSQL = sSQL & " AND Employees.FirstName='" & sPwd & "'"



set rsEmployees = conNthWind.Execute(sSQL)(ERROR OCCURED HERE)



%><?xml version="1.0" encoding = "LATIN-1" ?>

<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"

"http://www.wapforum.org/DTD/wml_1.1.xml">

<wml>

<%

if rsEmployees.eof then

%>

<card id="Redirect" title="Wrong Input" ontimer="Welcome.asp" >

<timer value="50" />

<p align="center">

<br />

Id or password incorrect

</p>

<do type="Accept" label="Retry">

<go href="Welcome.asp"/>

</do>

</card>

<%

else

%>

<card id="Menu" title="<%=rsEmployees("FirstName") & " " &

rsEmployees("LastName")%>" >





<p align="left">

<small>

<a href="StatsPerMonth.asp?Employee=$(Id)">See Sales per month</a><br

/>

<a href="OrderClient.asp?Employee=$(Id)">Order input</a>

</small>



</p>

<do type="Accept" label="Retry">

<go href="Welcome.asp"/>

</do>

</card>

<%

end if

rsEmployees.close

set rsEmployees=nothing



conNthWind.close

set conNthWind = nothing

%>

</wml>


  Return to Index