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)
 forum.asp - Sub TopicPaging - cint Error
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

GauravBhabu
Advanced Member

4288 Posts

Posted - 18 January 2002 :  13:14:54  Show Profile
Related Topic

http://forum.snitz.com/forum/topic.asp?TOPIC_ID=20689

To avoid the problem discussed in above topic the following


sub TopicPaging()
mxpages = (rs("T_REPLIES") / strPageSize)
if mxPages <> cint(mxPages) then
mxpages = int(mxpages) + 1
end if



may be modified as below


dim mxpages : mxpages = 0
if rs("T_REPLIES") > strPageSize then
mxpages = (rs("T_REPLIES") \ strPageSize)
if ((rs("T_REPLIES") Mod strPageSize) > 0) then
mxpages = mxpages + 1
end if
end if





www.forumSquare.com - GauravBhabu - It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.


Edited by - GauravBhabu on 18 January 2002 13:40:09

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 20 January 2002 :  15:05:29  Show Profile
It still seems to me that the error was related to a database error as Huwr pointed out. And the problem was fixed when the user entered the value 0 into the field T_REPLIES.

- David
Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 20 January 2002 :  15:18:19  Show Profile
Yes! That is from where the Null value came and that probably need to be fixed in from where the tables are being created.

I am not able to recall but I read somewhere regarding sql setting the default values in the fields to Null...vaguely remembered... something to do with initializing first time...

The above will limit the calculation to only when the value is not null and no. of replies is > than the value in strPageSize

www.forumSquare.com - GauravBhabu - It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.
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.08 seconds. Powered By: Snitz Forums 2000 Version 3.4.07