ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 8th, 2010, 09:04 AM
crazyshady crazyshady is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2007
Location: Dela-Where?
Posts: 42 crazyshady User rank is Private First Class (20 - 50 Reputation Level)crazyshady User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Week 6 h 39 m 54 sec
Reputation Power: 7
Send a message via AIM to crazyshady
Facebook MySpace
Error Help

Hello,

I should start off as saying I am a complete noob to asp. I am normally an PHP developer but I need to do a quick ASP project for my boss. I have this code so far:

Code:
<%

dim errors

call email_validate()

function email_validate()
    Dim required(7), data, errors(), check
    
    required(0) = "name"
    required(1) = "phone"
    required(2) = "address"
    required(3) = "city"
    required(4) = "state"
    required(5) = "zip"
    required(6) = "email"
    
    Set data=Server.CreateObject("Scripting.Dictionary")
    data.Add "name",""
    data.Add "phone",""
    data.Add "address",""
    data.Add "city",""
    data.Add "state",""
    data.Add "zip",""
    data.Add "email",""
    data.Add "comments",""
    
    For Each check In required
       If Not IsEmpty(Request.QueryString(check)) Then data.Item(check) = Request.QueryString(check) End If
    Next
    
end function

%>


Which throws this error:

Request object error 'ASP 0102 : 80004005'

Expecting string input

/test.asp, line 29

The function expects a string as input.

What am I missing? Thanks for your help.
__________________
"Bart Stop Pestering Satan!" - Marge Simpson

Reply With Quote
  #2  
Old December 8th, 2010, 10:20 AM
Doug G Doug G is offline
Grumpier Old Moderator
Dev Shed God 19th Plane (14000 - 14499 posts)
 
Join Date: Jun 2003
Posts: 14,235 Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level) 
Time spent in forums: 1 Month 4 Weeks 14 h 27 m 16 sec
Reputation Power: 4445
What's line 29?
__________________
======
Doug G
======
It is a truism of American politics that no man who can win an election deserves to. --Trevanian, from the novel Shibumi

Reply With Quote
  #3  
Old December 8th, 2010, 10:24 AM
crazyshady crazyshady is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2007
Location: Dela-Where?
Posts: 42 crazyshady User rank is Private First Class (20 - 50 Reputation Level)crazyshady User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Week 6 h 39 m 54 sec
Reputation Power: 7
Send a message via AIM to crazyshady
Facebook MySpace
Quote:
Originally Posted by Doug G
What's line 29?


Line 29 would be:

Code:
If Not IsEmpty(Request.QueryString(check)) Then data.Item(check) = Request.QueryString(check) End If


I have narrowed it down to this part of that line:

Code:
Request.QueryString(check)

Reply With Quote
  #4  
Old December 8th, 2010, 04:50 PM
Doug G Doug G is offline
Grumpier Old Moderator
Dev Shed God 19th Plane (14000 - 14499 posts)
 
Join Date: Jun 2003
Posts: 14,235 Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level) 
Time spent in forums: 1 Month 4 Weeks 14 h 27 m 16 sec
Reputation Power: 4445
Perhaps request.querystring(check) is null. In vbscript a null is not a string value and you can't convert null to a string. I used to use something like this as a workaround for dealing with nulls
Code:
if len(whatever) > 0 then
 ' something is in whatever
else
 ' whatever is null or an empty string
end if

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > Error Help

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap