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

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 asp question - Davio
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

doflynn
Starting Member

16 Posts

Posted - 03 April 2001 :  15:38:55  Show Profile
Davio,

I posted this here since you recommended it. I've done some mods and almost have it completed so that if a user has voted it shows the results in default.asp instead of the poll again. I have also written a section that determines the current winning vote, and only shows the featured poll and the winning answer. See http://www.wediealot.com/forums/newpoll.asp

Problem I'm having is when trying to figure out if they have voted.

I'm using this currently, based on the poll mod in topic.asp, but it isn't working right

rs is my dataset where I query the poll information.

"if Request.Cookies("poll")(rs("TOPIC_ID")) = RS("TOPIC_ID") then"

but am getting an error :
Cookies object error 'ASP 0105 : 80004005'
Index out of range
/forums/newpoll.asp, line 131
An array index is out of range.

Derek


Edited by - doflynn on 03 April 2001 15:46:05

HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 03 April 2001 :  18:38:09  Show Profile  Visit HuwR's Homepage
it is because rs("TOPIC_ID") is an integer not a string

try using

"if Request.Cookies("poll")(cstr(rs("TOPIC_ID"))) = RS("TOPIC_ID") then"



Go to Top of Page

doflynn
Starting Member

16 Posts

Posted - 04 April 2001 :  17:18:06  Show Profile
Thanks Huwr, I had to convert the other side as well:
"if Request.Cookies("poll")(cstr(rs("TOPIC_ID"))) = cstr(RS("TOPIC_ID")) then"


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.21 seconds. Powered By: Snitz Forums 2000 Version 3.4.07