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

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 new poll mod error
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

rsoxhater
Junior Member

120 Posts

Posted - 30 May 2003 :  01:47:50  Show Profile
This just started happening with our polls - everything was installed and working fine before - check out the error here:

http://www.traderretreat.com/community/topic.asp?TOPIC_ID=33758

Any ideas what would cause this / how to fix it?

THanks guys!

Edited by - rsoxhater on 30 May 2003 01:48:03

Rasco
Advanced Member

Germany
3192 Posts

Posted - 30 May 2003 :  03:25:04  Show Profile  Send Rasco an ICQ Message
Which error? Can`t see one.

German Snitz Forum

Edited by - Rasco on 30 May 2003 03:26:01
Go to Top of Page

rsoxhater
Junior Member

120 Posts

Posted - 30 May 2003 :  14:35:08  Show Profile
It only happens when your logged in - try viewing it logged in as the following accoutn: guest / pass: trguest
Go to Top of Page

rsoxhater
Junior Member

120 Posts

Posted - 30 May 2003 :  14:36:49  Show Profile
You can vote fine when not logged in, but you get an error when logged in. Really odd, I've never seen this happen before...
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 30 May 2003 :  14:45:06  Show Profile
I still don't see or get any error when I voted using that guest account.

Support Snitz Forums
Go to Top of Page

rsoxhater
Junior Member

120 Posts

Posted - 30 May 2003 :  16:58:46  Show Profile
This is the error members get:

Microsoft VBScript runtime error '800a0006'

Overflow: 'cint'

/community/inc_func_common.asp, line 62
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 30 May 2003 :  23:51:20  Show Profile
And can you post the code that is on line 62 in the inc_func_common.asp file? And also include at least 10 lines of code before line 62.

Support Snitz Forums
Go to Top of Page

rsoxhater
Junior Member

120 Posts

Posted - 17 June 2003 :  22:14:02  Show Profile
Sorry for my delay here guys:

the code around 62:


'##############################################
'## Poll Mod ##
'##############################################

function GetVote(pTopic_id)
Dim tmpVoted

if strWhoVotes = "members" or (strWhoVotes <> "members" and mLev > 0) then
'## Forum SQL - See if user has voted in this poll
strSql = "SELECT TOPIC_ID " &_
"FROM " & strTablePrefix & "POLL_VOTES " &_
"WHERE MEMBER_ID = " & MemberID

set rsPoll2 = Server.CreateObject("ADODB.Recordset")
rsPoll2.open strSql, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText

if rsPoll2.EOF or rsPoll2.BOF then
tmpVoted = false
else
do until rsPoll2.EOF or rsPoll2.BOF
----> LINE 62 if cint(pTopic_id) = cint(rsPoll2("TOPIC_ID")) then
tmpVoted = true
exit do
else
tmpVoted = false
end if
rsPoll2.MoveNext
loop
end if

rsPoll2.close
set rsPoll2 = nothing
end if
Go to Top of Page

rsoxhater
Junior Member

120 Posts

Posted - 17 June 2003 :  22:15:36  Show Profile
I also haven't changed anything in the code anytime around the tiem this has started happening. Anything you can do Davio or anyone else is greatly appreciated - polls are a big part of our forums.

Thanks
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 18 June 2003 :  11:28:27  Show Profile
You will have to do some testing to see why the CInt function is erroring out. Do this, right near the same code you posted add the code in red:
do until rsPoll2.EOF or rsPoll2.BOF
    Response.Write "ID:" & pTopic_id & "<br>ID2:" & rsPoll2("TOPIC_ID") & "<br>"
    Response.End
    if cint(pTopic_id) = cint(rsPoll2("TOPIC_ID")) then
        tmpVoted = true
        exit do
    else
Then try reproducing the error again. You should see some text on the page. Just copy and paste the text in your next post.

Support Snitz Forums
Go to Top of Page

rsoxhater
Junior Member

120 Posts

Posted - 18 June 2003 :  19:25:31  Show Profile
Davio - thanks for help - heres what it says:

ID:37274
ID2:32677
Go to Top of Page

rsoxhater
Junior Member

120 Posts

Posted - 18 June 2003 :  19:55:37  Show Profile
Also, if this helps, the header and everything shows up fine on the page, just where the message should be it gives that error.

thanks again davio!
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 19 June 2003 :  07:48:39  Show Profile
Ok, don't know why I didn't think of that before. Your topic ID's have moved out of scope of an Integer. Integer can only hold somewhere to 32,000 or -32,000. Since your id is 37,000 cint throws an error. You will need to change the CInt to CLng (change both of them on that line). This will convert it to a Long variable which can hold a higher figure.

Support Snitz Forums
Go to Top of Page

rsoxhater
Junior Member

120 Posts

Posted - 19 June 2003 :  23:28:36  Show Profile
ok - give me a quick run down on how to do that davio - i can access the database via enterprise manager if needed.

Thanks davio!!!
Go to Top of Page

laser
Advanced Member

Australia
3859 Posts

Posted - 19 June 2003 :  23:52:19  Show Profile
Would the database need to be changed as well ?

check the datatype of the field, I think it is longer than INTEGER (+/- 32767)

So it's just the CInt in your code needs to change to CLng, at various locations.
Go to Top of Page

rsoxhater
Junior Member

120 Posts

Posted - 20 June 2003 :  00:32:46  Show Profile
lol i reread that davio - thanks, i changed those two instances and everything seems to work - thanks davio and laser!
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.36 seconds. Powered By: Snitz Forums 2000 Version 3.4.07