Hi Lionstone,
The line you reference, in the Check Username behaviour
reads:
Response.Redirect(MM_dupKeyRedirect)
MM_dupKeyRedirect is specified earlier in the script as:
MM_dupKeyRedirect = "registration.asp"
The script also tags on the duplicate username as a
querystring value
"requesrname", as you rightly state.
So, anyway, I changed the Response.Redirect to read:
Response.Redirect(MM_dupKeyRedirect & "&" &
Request.Form)
...and I notice that the form data is being brought over as a
QueryString,
however I am now getting this:
Microsoft JET Database Engine error '80040e10'
Parameter ?_1 has no default value.
line 63
Line 63 is:
MM_editCmd.Execute
...but Parameter 1 is:
MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param1", 202, 1,
50, Request.Form("firstname")) ' adVarWChar
...regardless of whether I have the method set to POST or
GET.
Not sure what this could be. Any ideas?
Appreciate the help, as ever.
Regards
nath.
"Lionstone" <HIDElionstone@HIDEhushmail.com> wrote in
message
news:erhtk2$i86$1@forums.macromedia.com...
> The built-in behaviors might only work with a POST form.
It's been a
> while since I've used them. So scratch that.
>
> In your case, it's the check new username redirect that
you need to
> preserve the values. In that behavior, you'll see a line
that says
> Response.Redirect(something). That something might be a
variable such as
> MM_redirectURL, or it might be the actual page URL
"myForm.asp" or
> something. In either case, just add the entire form to
the URL:
> Response.Redirect(someVariable & "&" &
Request.Form)
> or
> Response.Redirect("somePage.asp?" & Request.Form)
>
> If I recall, the check new username redirect URL already
has "badusername"
> added to the query string, that's why I appended "&"
in the first example.
> If that's different now, then simply use "?" as normal
to start the query
> string part of the URL.
>
>
> "tradmusic.com" <sales@NOSHPAMtradmusic.com> wrote
in message
> news:erhic5$4n7$1@forums.macromedia.com...
>> Hi again Lionstone. I notice a couple of requests
for this feature, so
>> hopefully this will help a few out.
>> At the moment, the form is:
>> <form ACTION="<%=MM_editAction%>"
METHOD="POST" name="form1">
>>
>> So, I've changed the method to "GET" but I'm now
getting this when I
>> submit the form:
>> Microsoft JET Database Engine error '80040e10'
>> Parameter ?_1 has no default value.
>>
>> Parameter 1 is:
>> MM_editCmd.Parameters.Append
MM_editCmd.CreateParameter("param1", 202, 1,
>> 50, Request.Form("firstname")) ' adVarWChar
>>
>> Is there something else I need to change other than
the Method?
>> Could you also explain, in a little more detail, how
to add the entered
>> form values to the redirect part of the behaviour?
Which behaviour? The
>> Check Username or the Insert Record?
>>
>> Hope you can help.
>>
>> Thanks.
>> Nath.
>>
>>
>> "Lionstone" <HIDElionstone@HIDEhushmail.com>
wrote in message
>> news:erhgrm$321$1@forums.macromedia.com...
>>> You have a few options. You can change the form
to GET and treat it
>>> like a query string. The check new username
behavior will preserve the
>>> query string. You can also find the redirect
part of the behavior and
>>> explicitly add the form collection as a query
string
>>> (Response.Redirect(myURL & Request.Form).
The form's default values can
>>> then be set to the matching query string value.
If the check new
>>> username behavior and the actual insert behavior
are on a different page
>>> than the form, you can also just change
response.redirect to
>>> server.transfer, and the form will then be
available on the registration
>>> page.
>>>
>>>
>>> "tradmusic.com"
<sales@NOSHPAMtradmusic.com> wrote in message
>>> news:erhb9i$pmb$1@forums.macromedia.com...
>>>>I have a customer registration form. It asks
the customer to enter a
>>>>username. I have the Check Username behaviour
on this form page, along
>>>>with the Insert behaviour of course.
>>>>
>>>> If the Username already exists in the
database, I am just re-directing
>>>> to the same registration form/page however
the other fields are wiped
>>>> after the re-direct.
>>>>
>>>> How can I retain the data entered in all of
these fields so that the
>>>> customer only has to enter a new username?
>>>>
>>>> Thanks.
>>>> nath.
>>>>
>>>
>>>
>>
>>
>
>