Thanks for all your help Lionstone and that is a really
usefull document. I
just have one final request though. This problem I have with
the update not
happening since I added your code is due, I am sure, to the
name of the
'Change' field being passed to the parameter in the stored
proc.
Can you tell me how I should reference this field when
passing it to the
stored proc? The proc will only update the record if this
value = 'Yes' and
I am sure that it just can't see it as I have it at the
moment.
Thankyou.
"Lionstone" <HIDElionstone@HIDEhushmail.com> wrote in
message
news:eiac6q$jbn$1@forums.macromedia.com...
> Actually, there's a very good example of how this kind
of update typically
> looks over at www.drdev.net.
> They use a plain-text query, so they create and destroy
the command object
> in every iteration of the loop. That's the one thing I'd
change.
> Construct your command object OUTSIDE the loop, and
leave the values off
> of your parameters. Then, for each loop iteration, you'd
just have
>
> myCommand.Parameters("@myParam").Value =
Request.Form("myParam"&X)
>
> Using your command name, parameter names, and loop
variable, of course. :)
> Just do that for every parameter, execute, and loop.
>
> Then destroy the object after the loop. Dr Dev is
correct in creating a
> new object each pass using plain-text queries like that,
but it's the
> wrong approach with a stored procedure or parameterized
SQL.
>
>
> "SteveG" <jghj@h.com> wrote in message
> news:ei9sl5$22p$1@forums.macromedia.com...
>> Hi Lionstone,
>>
>> This does as you say (thankyou) and works in
changing the value of the
>> hidden field. The problem I have now is that the
update on the next page
>> does not work. The SQL is in a stored procedure and
worked ok before. It
>> doesn't error it just doesn't update anything. I
wonder whether this is
>> due to changes I made to the field?
>>
>> If you have time, would you be so kind as to give me
a sample of the code
>> you would expect to see on the update page that
calls the Stored Proc so
>> I can compare field names etc to the code I have at
the moment.
>>
>> Thankyou.
>>
>>
>>
>> "Lionstone" <HIDElionstone@HIDEhushmail.com>
wrote in message
>> news:ei7mr1$c6b$1@forums.macromedia.com...
>>>
>>> "SteveG" <ssdfsd@sdfsd.com> wrote in
message
>>> news:ei64ci$etl$1@forums.macromedia.com...
>>>> So, I simply just change my existing code to
what you have shown me
>>>> here? I don't have access to the PC that
this resides on at the moment
>>>> so I cannot test for a couple of hours but
is that all I need to do?
>>>
>>> Replace the javascript function and the onChange
event handler, yes.
>>>
>>
>>
>
>