|
 |
asp_databases thread: POST with Multiple Fields
Message #1 by "Ray Murphy" <raymondmurphy@c...> on Mon, 14 Aug 2000 16:18:42
|
|
And today's silly question is .....
I'm building an ASP search page, and can be using up to 4 four fields for
the search criteria (search1, search2, search3, search4). After completing
the search criteria on the search page(search1 contains 'Dev' and search2
contains 'SignOff' - search3 and search4 have been left blank) - the data
is then sent to another via "FORM .. ACTION="DoSearch.asp" METHOD="POST".
But "DoSearch.asp" throws a wobbly (arguments are of the wrong type, are
out of acceptable range, or are in conflict with another ...) and shows
the
POST Data as being :
'search1=+Dev+&search2=+SignOff+&search3=&search4='
I can see that the '&' is 'delimiting' each of the search fields, but I
wasn't expecting to see the '+' symbol in the POST data, and am not sure if
this is what causing the problem.
Any ideas, anyone ?
Thanks.
Ray
Message #2 by ckoski@w... on Mon, 14 Aug 2000 11:54:18 -0400
|
|
pluses are spaces
----- Original Message -----
From: "Ray Murphy" <raymondmurphy@c...>
To: "ASP Databases" <asp_databases@p...>
Sent: Monday, August 14, 2000 4:18 PM
Subject: [asp_databases] POST with Multiple Fields
> And today's silly question is .....
>
> I'm building an ASP search page, and can be using up to 4 four fields for
> the search criteria (search1, search2, search3, search4). After completing
> the search criteria on the search page(search1 contains 'Dev' and search2
> contains 'SignOff' - search3 and search4 have been left blank) - the data
> is then sent to another via "FORM .. ACTION="DoSearch.asp" METHOD="POST".
>
> But "DoSearch.asp" throws a wobbly (arguments are of the wrong type, are
> out of acceptable range, or are in conflict with another ...) and shows
> the
> POST Data as being :
>
> 'search1=+Dev+&search2=+SignOff+&search3=&search4='
>
> I can see that the '&' is 'delimiting' each of the search fields, but I
> wasn't expecting to see the '+' symbol in the POST data, and am not sure
if
> this is what causing the problem.
>
> Any ideas, anyone ?
>
>
> Thanks.
>
>
> Ray
>
> ---
> You are currently subscribed to asp_databases
$subst('Email.Unsub')
>
>
Message #3 by Yoram Zehavi <YoramZ@i...> on Mon, 14 Aug 2000 18:56:18 +0200
|
|
if i understood the way you try to do it (javascript), so - you should do it
that way:
'search1=' + 'Dev&search2=' + SignOff&search3=&search4='
-----Original Message-----
From: Ray Murphy [mailto:raymondmurphy@c...]
Sent: Monday, August 14, 2000 6:19 PM
To: ASP Databases
Subject: [asp_databases] POST with Multiple Fields
And today's silly question is .....
I'm building an ASP search page, and can be using up to 4 four fields for
the search criteria (search1, search2, search3, search4). After completing
the search criteria on the search page(search1 contains 'Dev' and search2
contains 'SignOff' - search3 and search4 have been left blank) - the data
is then sent to another via "FORM .. ACTION="DoSearch.asp" METHOD="POST".
But "DoSearch.asp" throws a wobbly (arguments are of the wrong type, are
out of acceptable range, or are in conflict with another ...) and shows
the
POST Data as being :
'search1=+Dev+&search2=+SignOff+&search3=&search4='
I can see that the '&' is 'delimiting' each of the search fields, but I
wasn't expecting to see the '+' symbol in the POST data, and am not sure if
this is what causing the problem.
Any ideas, anyone ?
Thanks.
Ray
---
You are currently subscribed to asp_databases
Message #4 by "Nick Middleweek" <nickm@t...> on Mon, 14 Aug 2000 17:05:04 +0000
|
|
What code is it your using to pick up the POSTed form data?
The "+"'s are OK, they are standard internet encoding of the space
characters!
I usually use something like the following:
.
.
.
If (Request.ServerVariables("CONTENT_LENGTH") <> 0) Then
vsSearch1 = Trim(Request.Form("search1"))
vsSearch2 = Trim(Request.Form("search2"))
vsSearch3 = Trim(Request.Form("search3"))
vsSearch4 = Trim(Request.Form("search4"))
Else
`Do a redirect or send another page.
End If
.
.
.
You can then test to see if each search paramenter is blank one of two ways:
If (vsSearch1 <> "")
`Then we have something in there
End If
`-or-
If (Len(vsSearch1) <> 0)
`Then we have something in there
End If
HTH
Regards
Nick Middleweek
----------
> And today's silly question is .....
>
> I'm building an ASP search page, and can be using up to 4 four fields for
> the search criteria (search1, search2, search3, search4). After completing
> the search criteria on the search page(search1 contains 'Dev' and search2
> contains 'SignOff' - search3 and search4 have been left blank) - the data
> is then sent to another via "FORM .. ACTION="DoSearch.asp" METHOD="POST".
>
> But "DoSearch.asp" throws a wobbly (arguments are of the wrong type, are
> out of acceptable range, or are in conflict with another ...) and shows
> the
> POST Data as being :
>
> 'search1=+Dev+&search2=+SignOff+&search3=&search4='
>
> I can see that the '&' is 'delimiting' each of the search fields, but I
> wasn't expecting to see the '+' symbol in the POST data, and am not sure if
> this is what causing the problem.
>
> Any ideas, anyone ?
>
>
> Thanks.
>
>
> Ray
>
Message #5 by Yoram Zehavi <YoramZ@i...> on Mon, 14 Aug 2000 19:12:28 +0200
|
|
you dont have to use the spaces
-----Original Message-----
From: ckoski
Sent: Monday, August 14, 2000 5:54 PM
To: ASP Databases
Subject: [asp_databases] Re: POST with Multiple Fields
pluses are spaces
----- Original Message -----
From: "Ray Murphy" <raymondmurphy@c...>
To: "ASP Databases" <asp_databases@p...>
Sent: Monday, August 14, 2000 4:18 PM
Subject: [asp_databases] POST with Multiple Fields
> And today's silly question is .....
>
> I'm building an ASP search page, and can be using up to 4 four fields for
> the search criteria (search1, search2, search3, search4). After completing
> the search criteria on the search page(search1 contains 'Dev' and search2
> contains 'SignOff' - search3 and search4 have been left blank) - the data
> is then sent to another via "FORM .. ACTION="DoSearch.asp" METHOD="POST".
>
> But "DoSearch.asp" throws a wobbly (arguments are of the wrong type, are
> out of acceptable range, or are in conflict with another ...) and shows
> the
> POST Data as being :
>
> 'search1=+Dev+&search2=+SignOff+&search3=&search4='
>
> I can see that the '&' is 'delimiting' each of the search fields, but I
> wasn't expecting to see the '+' symbol in the POST data, and am not sure
if
> this is what causing the problem.
>
> Any ideas, anyone ?
>
>
> Thanks.
>
>
> Ray
Message #6 by Yoram Zehavi <YoramZ@i...> on Mon, 14 Aug 2000 19:17:41 +0200
|
|
do you use the form_name.submit() (in javascript) or the submit button in
the form?
-----Original Message-----
From: ckoski
Sent: Monday, August 14, 2000 5:54 PM
To: ASP Databases
Subject: [asp_databases] Re: POST with Multiple Fields
pluses are spaces
----- Original Message -----
From: "Ray Murphy"
To: "ASP Databases" <asp_databases@p...>
Sent: Monday, August 14, 2000 4:18 PM
Subject: [asp_databases] POST with Multiple Fields
> And today's silly question is .....
>
> I'm building an ASP search page, and can be using up to 4 four fields for
> the search criteria (search1, search2, search3, search4). After completing
> the search criteria on the search page(search1 contains 'Dev' and search2
> contains 'SignOff' - search3 and search4 have been left blank) - the data
> is then sent to another via "FORM .. ACTION="DoSearch.asp" METHOD="POST".
>
> But "DoSearch.asp" throws a wobbly (arguments are of the wrong type, are
> out of acceptable range, or are in conflict with another ...) and shows
> the
> POST Data as being :
>
> 'search1=+Dev+&search2=+SignOff+&search3=&search4='
>
> I can see that the '&' is 'delimiting' each of the search fields, but I
> wasn't expecting to see the '+' symbol in the POST data, and am not sure
if
> this is what causing the problem.
>
> Any ideas, anyone ?
>
>
> Thanks.
>
>
> Ray
>
Message #7 by "Ray Murphy" <raymondmurphy@c...> on Tue, 15 Aug 2000 9:17:56
|
|
Ahaaa - "space the final frontier" and all that ....
Problem was where I was building my drop-down list which was used for the
search - I was accidentally including a space (ie
... <OPTION VALUE="<%= objRS("datafield") %>" .....
so that explained the "+" problem.
On the DoSearch page, I was originally using
Request.QueryString("datafield") to try and pick off the search values -
but after removing the erroneous space from the "<OPTION VALUE" code, I
also changed the
DoSearch page to use Request.Form rather than Request.QueryString.
And the code now works OK - so thanks to everyone for their observations on
my blunderings .....
Ray
Message #8 by "Ken Schaefer" <ken@a...> on Tue, 15 Aug 2000 12:30:25 +1000
|
|
Ray,
You might want to look here:
http://www.adopenstatic.com/faq/800a0bb9.asp FAQ on 800a0bb9 errors
My guess is you are sending malformed, or incorrect parameters, or undefined
parameters to your objRS.Open method call.
However, without some code, we can't help you more than that...
Cheers
Ken
> ----- Original Message -----
> From: "Ray Murphy" <raymondmurphy@c...>
> To: "ASP Databases" <asp_databases@p...>
> Sent: Monday, August 14, 2000 4:18 PM
> Subject: [asp_databases] POST with Multiple Fields
>
>
> > And today's silly question is .....
> >
> > I'm building an ASP search page, and can be using up to 4 four fields
for
> > the search criteria (search1, search2, search3, search4). After
completing
> > the search criteria on the search page(search1 contains 'Dev' and
search2
> > contains 'SignOff' - search3 and search4 have been left blank) - the
data
> > is then sent to another via "FORM .. ACTION="DoSearch.asp"
METHOD="POST".
> >
> > But "DoSearch.asp" throws a wobbly (arguments are of the wrong type, are
> > out of acceptable range, or are in conflict with another ...) and shows
> > the
> > POST Data as being :
> >
> > 'search1=+Dev+&search2=+SignOff+&search3=&search4='
> >
> > I can see that the '&' is 'delimiting' each of the search fields, but I
> > wasn't expecting to see the '+' symbol in the POST data, and am not sure
> if
> > this is what causing the problem.
> >
> > Any ideas, anyone ?
> >
> >
> > Thanks.
> >
> >
> > Ray
> >
> > ---
> > You are currently subscribed to asp_databases
> $subst('Email.Unsub')
> >
> >
>
>
>
> ---
> You are currently subscribed to asp_databases
$subst('Email.Unsub')
>
|
|
 |