Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_web_howto thread: Operation is not allowed


Message #1 by nusrat sarwar <nusratsarwar@y...> on Sun, 23 Dec 2001 11:42:56 -0800 (PST)
Error Type:

ADODB.Recordset (0x800A0E78)

Operation is not allowed when the object is closed.



this messege I received but when I check DB the info

is being inserted in the table.

the code is :(forgive any blunder)



<%@ LANGUAGE = 'VBSCRIPT'%>

<%option explicit'%>

<%

dim strconn

dim dbcon

dim rs

dim strTextField

dim strTextField2

dim strTextField3

dim strTextField4

dim strTextField5

dim strTextField6

strconn = "DRIVER=Microsoft Access Driver

(*.mdb);DBQ=" & Server.MapPath("/myfolder/mydb.mdb") 

set dbcon=server.createobject("adodb.connection")

set rs=server.createobject("adodb.recordset")

dbcon.open strconn

If Request.Form("action") <> "Save Form Data" Then	







	

 strTextField= Request.Form("loginid")   

 strTextField2 = Request.Form("password")

 strTextField3     = Request.Form("fname")

 strTextField4     = Request.Form("lastname")

 strTextField5     = Request.Form("zipostalcode")

 strTextField6     = Request.Form("scname")



rs.open "INSERT INTO login

(loginid,password,fname,lastname,zipostalcode,scname)

VALUES (' "& strTextField & " ',' "& strTextField2 &

"' , '"& strTextField3 & "' , '"& strTextField4 & "',

'" & strTextField5 & "' ,'" & strTextField6 &

"')",dbcon,2,2



		



End If

rs.close

dbcon.close

set rs = nothing

set dbcon = nothing	

	





' Display a verification message and we're done!		

%>

<html>

<body>

		<H2>Thanks for submitting your information to

us!</H2>				

			

				





</BODY>

</HTML>







__________________________________________________

Do You Yahoo!?

Send your FREE holiday greetings online!

http://greetings.yahoo.com

Message #2 by "TomMallard" <mallard@s...> on Sun, 23 Dec 2001 13:27:19 -0800
Try adding...



on error resume next



after the insert.



tom mallard

seattle

----- Original Message -----

From: "nusrat sarwar" <nusratsarwar@y...>

To: "ASP Web HowTo" <asp_web_howto@p...>

Sent: Sunday, December 23, 2001 11:42 AM

Subject: [asp_web_howto] Operation is not allowed





> Error Type:

> ADODB.Recordset (0x800A0E78)

> Operation is not allowed when the object is closed.

>

> this messege I received but when I check DB the info

> is being inserted in the table.

> the code is :(forgive any blunder)

>

> <%@ LANGUAGE = 'VBSCRIPT'%>

> <%option explicit'%>

> <%

> dim strconn

> dim dbcon

> dim rs

> dim strTextField

> dim strTextField2

> dim strTextField3

> dim strTextField4

> dim strTextField5

> dim strTextField6

> strconn = "DRIVER=Microsoft Access Driver

> (*.mdb);DBQ=" & Server.MapPath("/myfolder/mydb.mdb")

> set dbcon=server.createobject("adodb.connection")

> set rs=server.createobject("adodb.recordset")

> dbcon.open strconn

> If Request.Form("action") <> "Save Form Data" Then

>

>

>

>

>  strTextField= Request.Form("loginid")

>  strTextField2 = Request.Form("password")

>  strTextField3     = Request.Form("fname")

>  strTextField4     = Request.Form("lastname")

>  strTextField5     = Request.Form("zipostalcode")

>  strTextField6     = Request.Form("scname")

>

> rs.open "INSERT INTO login

> (loginid,password,fname,lastname,zipostalcode,scname)

> VALUES (' "& strTextField & " ',' "& strTextField2 &

> "' , '"& strTextField3 & "' , '"& strTextField4 & "',

> '" & strTextField5 & "' ,'" & strTextField6 &

> "')",dbcon,2,2

>

>

>

> End If

> rs.close

> dbcon.close

> set rs = nothing

> set dbcon = nothing

>

>

>

> ' Display a verification message and we're done!

> %>

> <html>

> <body>

> <H2>Thanks for submitting your information to

> us!</H2>

>

>

>

>

> </BODY>

> </HTML>

>

>

>

> __________________________________________________

> Do You Yahoo!?

> Send your FREE holiday greetings online!

> http://greetings.yahoo.com

>




$subst('Email.Unsub').

>



Message #3 by nusrat sarwar <nusratsarwar@y...> on Sun, 23 Dec 2001 13:17:56 -0800 (PST)
ok tom 

i will try it 

many thanx again for prompt answer

regards

nusrat

--- TomMallard <mallard@s...> wrote:

> Try adding...

> 

> on error resume next

> 

> after the insert.

> 

> tom mallard

> seattle

> ----- Original Message -----

> From: "nusrat sarwar" <nusratsarwar@y...>

> To: "ASP Web HowTo" <asp_web_howto@p...>

> Sent: Sunday, December 23, 2001 11:42 AM

> Subject: [asp_web_howto] Operation is not allowed

> 

> 

> > Error Type:

> > ADODB.Recordset (0x800A0E78)

> > Operation is not allowed when the object is

> closed.

> >

> > this messege I received but when I check DB the

> info

> > is being inserted in the table.

> > the code is :(forgive any blunder)

> >

> > <%@ LANGUAGE = 'VBSCRIPT'%>

> > <%option explicit'%>

> > <%

> > dim strconn

> > dim dbcon

> > dim rs

> > dim strTextField

> > dim strTextField2

> > dim strTextField3

> > dim strTextField4

> > dim strTextField5

> > dim strTextField6

> > strconn = "DRIVER=Microsoft Access Driver

> > (*.mdb);DBQ=" &

> Server.MapPath("/myfolder/mydb.mdb")

> > set dbcon=server.createobject("adodb.connection")

> > set rs=server.createobject("adodb.recordset")

> > dbcon.open strconn

> > If Request.Form("action") <> "Save Form Data" Then

> >

> >

> >

> >

> >  strTextField= Request.Form("loginid")

> >  strTextField2 = Request.Form("password")

> >  strTextField3     = Request.Form("fname")

> >  strTextField4     = Request.Form("lastname")

> >  strTextField5     = Request.Form("zipostalcode")

> >  strTextField6     = Request.Form("scname")

> >

> > rs.open "INSERT INTO login

> >

>

(loginid,password,fname,lastname,zipostalcode,scname)

> > VALUES (' "& strTextField & " ',' "& strTextField2

> &

> > "' , '"& strTextField3 & "' , '"& strTextField4 &

> "',

> > '" & strTextField5 & "' ,'" & strTextField6 &

> > "')",dbcon,2,2

> >

> >

> >

> > End If

> > rs.close

> > dbcon.close

> > set rs = nothing

> > set dbcon = nothing

> >

> >

> >

> > ' Display a verification message and we're done!

> > %>

> > <html>

> > <body>

> > <H2>Thanks for submitting your information to

> > us!</H2>

> >

> >

> >

> >

> > </BODY>

> > </HTML>

> >

> >

> >

> > __________________________________________________

> > Do You Yahoo!?

> > Send your FREE holiday greetings online!

> > http://greetings.yahoo.com

> >





> $subst('Email.Unsub').

> >

> 

> 





$subst('Email.Unsub').





__________________________________________________

Do You Yahoo!?

Send your FREE holiday greetings online!

http://greetings.yahoo.com

Message #4 by "TomMallard" <mallard@s...> on Sun, 23 Dec 2001 20:30:40 -0800
It also could be from the MDAC version not being recent enough to support

inserts via ADO, like for an Access db...



tom

----- Original Message -----

From: "nusrat sarwar" <nusratsarwar@y...>

To: "ASP Web HowTo" <asp_web_howto@p...>

Sent: Sunday, December 23, 2001 1:17 PM

Subject: [asp_web_howto] Re: Operation is not allowed





> ok tom

> i will try it

> many thanx again for prompt answer

> regards

> nusrat

> --- TomMallard <mallard@s...> wrote:

> > Try adding...

> >

> > on error resume next

> >

> > after the insert.

> >

> > tom mallard

> > seattle

> > ----- Original Message -----

> > From: "nusrat sarwar" <nusratsarwar@y...>

> > To: "ASP Web HowTo" <asp_web_howto@p...>

> > Sent: Sunday, December 23, 2001 11:42 AM

> > Subject: [asp_web_howto] Operation is not allowed

> >

> >

> > > Error Type:

> > > ADODB.Recordset (0x800A0E78)

> > > Operation is not allowed when the object is

> > closed.

> > >

> > > this messege I received but when I check DB the

> > info

> > > is being inserted in the table.

> > > the code is :(forgive any blunder)

> > >

> > > <%@ LANGUAGE = 'VBSCRIPT'%>

> > > <%option explicit'%>

> > > <%

> > > dim strconn

> > > dim dbcon

> > > dim rs

> > > dim strTextField

> > > dim strTextField2

> > > dim strTextField3

> > > dim strTextField4

> > > dim strTextField5

> > > dim strTextField6

> > > strconn = "DRIVER=Microsoft Access Driver

> > > (*.mdb);DBQ=" &

> > Server.MapPath("/myfolder/mydb.mdb")

> > > set dbcon=server.createobject("adodb.connection")

> > > set rs=server.createobject("adodb.recordset")

> > > dbcon.open strconn

> > > If Request.Form("action") <> "Save Form Data" Then

> > >

> > >

> > >

> > >

> > >  strTextField= Request.Form("loginid")

> > >  strTextField2 = Request.Form("password")

> > >  strTextField3     = Request.Form("fname")

> > >  strTextField4     = Request.Form("lastname")

> > >  strTextField5     = Request.Form("zipostalcode")

> > >  strTextField6     = Request.Form("scname")

> > >

> > > rs.open "INSERT INTO login

> > >

> >

> (loginid,password,fname,lastname,zipostalcode,scname)

> > > VALUES (' "& strTextField & " ',' "& strTextField2

> > &

> > > "' , '"& strTextField3 & "' , '"& strTextField4 &

> > "',

> > > '" & strTextField5 & "' ,'" & strTextField6 &

> > > "')",dbcon,2,2

> > >

> > >

> > >

> > > End If

> > > rs.close

> > > dbcon.close

> > > set rs = nothing

> > > set dbcon = nothing

> > >

> > >

> > >

> > > ' Display a verification message and we're done!

> > > %>

> > > <html>

> > > <body>

> > > <H2>Thanks for submitting your information to

> > > us!</H2>

> > >

> > >

> > >

> > >

> > > </BODY>

> > > </HTML>

> > >

> > >

> > >

> > > __________________________________________________

> > > Do You Yahoo!?

> > > Send your FREE holiday greetings online!

> > > http://greetings.yahoo.com

> > >





> > $subst('Email.Unsub').

> > >

> >

> >





> $subst('Email.Unsub').

>

>

> __________________________________________________

> Do You Yahoo!?

> Send your FREE holiday greetings online!

> http://greetings.yahoo.com

>




$subst('Email.Unsub').

>




  Return to Index