RSS Forums RSS
Please support our ASP advertiser: Lunarpages ASP Web Hosting
Views: 2277 | Replies: 2 | Solved
Reply
Join Date: Jul 2005
Posts: 35
Reputation: k_en is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
k_en k_en is offline Offline
Light Poster

Help Type mismatch

  #1  
Mar 27th, 2007
dim num, GOPercent

num = Request.Cookies("Result")

GOPercent = num/25 Type mismatch: '[string: ""]'

Error Type mismatch. But the value i put in Response.cookies("Result") is a CInt(value)

how to solve this ?????
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Feb 2007
Location: London
Posts: 114
Reputation: davidcairns is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 8
davidcairns davidcairns is offline Offline
Junior Poster

Re: Type mismatch

  #2  
Mar 27th, 2007
I'm not sure if you're saying the value you get from num = Request.Cookies("Result") is blank or just that it is a mismatch.

First of all do the following to your code



num = Request.Cookies("Result")

If num <> "" Then

GOPercent = cInt(num)/25

End If



If you are saying you get no value back then check two things

1. You are definately setting Response("Result") to a value

2. Cookies are enabled on the client browser

You are going to need a lot more durable code to run this kind of thing so look in to how to preempt errors and handle issues. This isn't as easy in vbscript as it is in other languages, but there's always a way
Reply With Quote  
Join Date: Jul 2005
Posts: 35
Reputation: k_en is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
k_en k_en is offline Offline
Light Poster

Re: Type mismatch

  #3  
Mar 27th, 2007
Thanks.....Solve
Last edited by k_en : Mar 27th, 2007 at 8:00 am.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 9:11 am.
Newsletter Archive - Sitemap - Privacy Statement - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC