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 Bug Reports (Open)
 Default.asp EOF Issue
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 28 April 2009 :  14:57:25  Show Profile
In version 3.4.07, "default.asp", lines 91-93 need an EOF check.

On a new installation, we ran into an EOF reached error.

Should say:

	if not rs1.EOF then
		Users = rs1("U_COUNT")
		Topics = rs1("T_COUNT")
		Posts = rs1("P_COUNT")
	end if

AnonJr
Moderator

United States
5768 Posts

Posted - 28 April 2009 :  15:31:23  Show Profile  Visit AnonJr's Homepage
Under what conditions? What database type, etc. as it may have been a setup issue that caused the problem. (no default data or something)

Though, having said all that, there should be some sort of check even if it shouldn't be empy. But, I wouldn't not do something with those variables... maybe:

if strShowStatistics <> "1" then

	'## Forum_SQL
	strSql = "SELECT P_COUNT, T_COUNT, U_COUNT " &_
		 " FROM " & strTablePrefix & "TOTALS"

	Set rs1 = Server.CreateObject("ADODB.Recordset")
	rs1.open strSql, my_Conn

	If rs1.EOF Then
		Users = 0
		Topics = 0
		Posts = 0
	Else
		Users = rs1("U_COUNT")
		Topics = rs1("T_COUNT")
		Posts = rs1("P_COUNT")
	End If

	rs1.Close
	set rs1 = nothing
end if
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 28 April 2009 :  15:37:37  Show Profile
Database type was Access, connstr was default for Access 2000. Setting variable values to 0 (when they are of int type) shouldn't be required, they should automatically register 0.
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 28 April 2009 :  16:53:57  Show Profile  Visit HuwR's Homepage
you should never encounter an EOF since these values should either be present in the access db or inserted by setup.asp

unless of course you manualy edited the access database and deleted the record
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 28 April 2009 :  16:58:22  Show Profile  Visit AnonJr's Homepage
quote:
Originally posted by HuwR

you should never encounter an EOF since these values should either be present in the access db or inserted by setup.asp

unless of course you manualy edited the access database and deleted the record

That's what I was thinking too. I was wondering if there was anything odd in the configuration, setup, or if some change had been made.
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 28 April 2009 :  20:09:58  Show Profile
The cause of the error was a lack of write permission to the database (GoDaddy has to manually set permissions, there's no control for the admin/owner). Thus there were no values set and nothing for it to read, resulting in an EOF error. Once I fixed the EOF issue, we got the cannot write error report.
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 29 April 2009 :  04:26:40  Show Profile  Send ruirib a Yahoo! Message
From a programming point of view, the EOF check should be there. It's just the proper way to do it.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 29 April 2009 :  05:18:55  Show Profile  Visit HuwR's Homepage
quote:
Originally posted by ruirib

From a programming point of view, the EOF check should be there. It's just the proper way to do it.



maybe so, but that doesn't nmake it a bug, the only time you could possible get an EOF is if you have not set everything up correctly, and if using the provided access db you should never get an eof as there is a record existing in that table.

had the instructions in the readme been followed and setup.asp run then this error would never have manifested itself.
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 06 May 2009 :  17:51:06  Show Profile
Just because an error has not yet been encountered does not mean that the error does not exist. Granted, had the guy ran "setup.asp" before calling me, he would have discovered that a different error (no permissions) existed ... and still have been unable to create his forum since he could not modify those permissions even if he knew what to modify. Be that as it may, changing the code once an error has manifested itself will prevent that particular error from causing problems in the future.

Suggestion: I could possibly create a table of common errors (by number or title) which we could search to determine what has occurred, why they have occurred, and how to fix them. And, before someone says "Google it", I'm not looking for 30000 topics where people complain about the same error and the lack of responeses. If the idea appeals to anyone, please save your error message(s), numbers, and steps required to repair them and send the info to me as they occur.
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 06 May 2009 :  18:28:24  Show Profile  Visit HuwR's Homepage
sorry, but the error was due to not following instructions. had the instructions been followed the error CAN NEVER HAPPEN so the solution is to follow the instructions, nothing requires fixing. If you fail to follow the setup instructions you will encounter lots of errors, but they are not bugs.
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.16 seconds. Powered By: Snitz Forums 2000 Version 3.4.07