Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 DEV-Group
 DEV Discussions (General)
 Post.asp - Go_Result and Closing Recordsets
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

GauravBhabu
Advanced Member

4288 Posts

Posted - 13 September 2002 :  08:12:47  Show Profile
File: Post.asp

Statement in red may be added as shown.

Lines 120-124
set rsTCheck = my_Conn.Execute ("SELECT TOPIC_ID FROM " & strActivePrefix & "TOPICS WHERE TOPIC_ID = " & strRqTopicID)
if rsTCheck.EOF or rsTCheck.BOF then
        rsTCheck.Close
        set rsTCheck = nothing 
	Go_Result "Sorry, that Topic no longer exists in the Database"
end if
set rsTCheck = nothing


Lines 167-170

set rsStatus = my_Conn.Execute(strSql)
if rsStatus.EOF or rsStatus.BOF then
        rsStatus.close
	set rsStatus = nothing
	Go_Result "Please don't attempt to edit the URL<BR />to gain access to locked Forums/Categories."
else

CSS and HTML4.01 Compilant Snitz Forum . ForumSquare . Rakesh Jain

It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.

Prayer Of Forgiveness
"I forgive all living beings. May all living beings forgive me!
I cherish the friendliness towards all and harbour enmity towards none." -- Aavashyaka Sutra(Translated)

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 13 September 2002 :  11:58:42  Show Profile
if rsTCheck.EOF or rsTCheck.BOF then
        rsTCheck.Close
        set rsTCheck = nothing 
	Go_Result "Sorry, that Topic no longer exists in the Database"
end if
set rsTCheck = nothing
You don't need the code in red, since the record set will be set to nothing after the if...end if statement.

Support Snitz Forums

Edited by - Davio on 13 September 2002 11:59:36
Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 13 September 2002 :  12:56:14  Show Profile
It won't be Davio. When you go to Sub Go_Result, you do not come back. There is Response.end in sub Go_Result


function Go_Result(message) 
	Response.write 	"      <BR /><div ALIGN=""center"">" & message & "</div>" &_
			"      <BR />" &_
			"      <meta http-equiv=""Refresh"" content=""2; URL=default.asp"">"
	Call WriteFooter()
	Response.end
end function

CSS and HTML4.01 Compilant Snitz Forum . ForumSquare . Rakesh Jain

It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.

Prayer Of Forgiveness
"I forgive all living beings. May all living beings forgive me!
I cherish the friendliness towards all and harbour enmity towards none." -- Aavashyaka Sutra(Translated)
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 13 September 2002 :  13:05:29  Show Profile
Got it!

Support Snitz Forums
Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 16 September 2002 :  00:09:54  Show Profile
implemented in v3.4.03
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.2 seconds. Powered By: Snitz Forums 2000 Version 3.4.07