954,184 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Form request help

sql = "SELECT * FROM tblcsvdump"
set rs = connection.execute(sql)
records = rs.Fields.Count

dim heading(100)
dim pulled(100)
dim i
dim count
dim VAL
dim VEL
i=0
count = 0
for i=0 to records
 heading(count) = rs.Fields(count)
 response.write(heading(count))
 header = heading(count)
'**** THIS ROW HAS ERROR
 pulled(count) = Request.Form(header)
count=count+1
next


The error i receive is....
The function expects a string as input.


What am i doing wrong guys?

bodikon
Newbie Poster
12 posts since Jun 2006
Reputation Points: 10
Solved Threads: 0
 

I don't see that any of your variables are typed. Is this VB.NET? Is it loosely typed?

tgreer
Made Her Cry
Team Colleague
2,118 posts since Dec 2004
Reputation Points: 227
Solved Threads: 37
 

this is very odd code, so let's start by cleaning it up a little

sql = "SELECT * FROM tblcsvdump"
set rs = connection.execute(sql)
records = rs.Fields.Count

dim heading(100)
dim pulled(100)
dim i
dim VAL
dim VEL


for i=0 to records
 heading(i) = rs.Fields(i)
 response.write(heading(i))
 header = heading(i)
'**** THIS ROW HAS ERROR
 pulled(i) = Request.Form(header)
next


now, what line has error?
header = heading(i)
or
pulled(i) = Request.Form(header)

campkev
Posting Pro in Training
484 posts since Jul 2005
Reputation Points: 14
Solved Threads: 19
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You