Connecting Tech Pros Worldwide Help | Site Map

Multi Updates

Jamie Fryatt
Guest
 
Posts: n/a
#1: Jul 19 '05
Hi gusy, you advice here woud be great.

lets say we have a ms db with two cols

id value
1 4
2 7
3 9
4 1

is there a simple way of updating all the value fields with one form? so i
can have the page lay the four value's out in a list, the user could then
edit them and hit update and this would update all the value fields!

i can update single records no problem but have no idea where to start with
this one.

Thanks


Kheops
Guest
 
Posts: n/a
#2: Jul 19 '05

re: Multi Updates


UPDATE tableName set VALUE = x


This will update all the table fields :-)



"Jamie Fryatt" <james_fryatt@btconnect.com> wrote in message
news:bvnv1q$iui$1@hercules.btinternet.com...[color=blue]
> Hi gusy, you advice here woud be great.
>
> lets say we have a ms db with two cols
>
> id value
> 1 4
> 2 7
> 3 9
> 4 1
>
> is there a simple way of updating all the value fields with one form? so i
> can have the page lay the four value's out in a list, the user could then
> edit them and hit update and this would update all the value fields!
>
> i can update single records no problem but have no idea where to start[/color]
with[color=blue]
> this one.
>
> Thanks
>
>[/color]


Kheops
Guest
 
Posts: n/a
#3: Jul 19 '05

re: Multi Updates


I think I didn't understand your question...

Now it sounds better...

You have to make one request for each value if you want them to have
different values.

But explain your matter because it's not very clear :-\


"Jamie Fryatt" <james_fryatt@btconnect.com> wrote in message
news:bvnv1q$iui$1@hercules.btinternet.com...[color=blue]
> Hi gusy, you advice here woud be great.
>
> lets say we have a ms db with two cols
>
> id value
> 1 4
> 2 7
> 3 9
> 4 1
>
> is there a simple way of updating all the value fields with one form? so i
> can have the page lay the four value's out in a list, the user could then
> edit them and hit update and this would update all the value fields!
>
> i can update single records no problem but have no idea where to start[/color]
with[color=blue]
> this one.
>
> Thanks
>
>[/color]


Jamie Fryatt
Guest
 
Posts: n/a
#4: Jul 19 '05

re: Multi Updates


sorry if was unclear, ill try again.

one database, one table, two feilds (id, value) and four records.

i want to ahve a page where i list all four records (i can do that no
problem), each of the four values will apear in form boxs, i want the user
to be able to edit on the page any of the four all even all of them, hit
submit and asp to update each of the four records in one go, or with only
one click.

basicly can you update multipul records from one form? or does each one have
be submitted on its own, i was hoping there was some sort of loop in the
update process that could achieve this?


"Kheops" <gaetan.allart@kcc.com> wrote in message
news:101v0rtg5l6p989@corp.supernews.com...[color=blue]
> I think I didn't understand your question...
>
> Now it sounds better...
>
> You have to make one request for each value if you want them to have
> different values.
>
> But explain your matter because it's not very clear :-\
>
>
> "Jamie Fryatt" <james_fryatt@btconnect.com> wrote in message
> news:bvnv1q$iui$1@hercules.btinternet.com...[color=green]
> > Hi gusy, you advice here woud be great.
> >
> > lets say we have a ms db with two cols
> >
> > id value
> > 1 4
> > 2 7
> > 3 9
> > 4 1
> >
> > is there a simple way of updating all the value fields with one form? so[/color][/color]
i[color=blue][color=green]
> > can have the page lay the four value's out in a list, the user could[/color][/color]
then[color=blue][color=green]
> > edit them and hit update and this would update all the value fields!
> >
> > i can update single records no problem but have no idea where to start[/color]
> with[color=green]
> > this one.
> >
> > Thanks
> >
> >[/color]
>
>[/color]


Kheops
Guest
 
Posts: n/a
#5: Jul 19 '05

re: Multi Updates


Of course you can.

But you have to make a request for each record listed on your page.

for i =1 to numberOfRecords
execute ("UPDATE tableName set value =" & valueOfField(i) & " WHERE id =
" & i)
next


I would do like this...

Sorry I'm not english, it's a bit pmore difficult to understand your request
:-)

Bye bye

"Jamie Fryatt" <james_fryatt@btconnect.com> wrote in message
news:bvo20u$q0o$1@hercules.btinternet.com...[color=blue]
> sorry if was unclear, ill try again.
>
> one database, one table, two feilds (id, value) and four records.
>
> i want to ahve a page where i list all four records (i can do that no
> problem), each of the four values will apear in form boxs, i want the[/color]
user[color=blue]
> to be able to edit on the page any of the four all even all of them, hit
> submit and asp to update each of the four records in one go, or with only
> one click.
>
> basicly can you update multipul records from one form? or does each one[/color]
have[color=blue]
> be submitted on its own, i was hoping there was some sort of loop in the
> update process that could achieve this?
>
>
> "Kheops" <gaetan.allart@kcc.com> wrote in message
> news:101v0rtg5l6p989@corp.supernews.com...[color=green]
> > I think I didn't understand your question...
> >
> > Now it sounds better...
> >
> > You have to make one request for each value if you want them to have
> > different values.
> >
> > But explain your matter because it's not very clear :-\
> >
> >
> > "Jamie Fryatt" <james_fryatt@btconnect.com> wrote in message
> > news:bvnv1q$iui$1@hercules.btinternet.com...[color=darkred]
> > > Hi gusy, you advice here woud be great.
> > >
> > > lets say we have a ms db with two cols
> > >
> > > id value
> > > 1 4
> > > 2 7
> > > 3 9
> > > 4 1
> > >
> > > is there a simple way of updating all the value fields with one form?[/color][/color][/color]
so[color=blue]
> i[color=green][color=darkred]
> > > can have the page lay the four value's out in a list, the user could[/color][/color]
> then[color=green][color=darkred]
> > > edit them and hit update and this would update all the value fields!
> > >
> > > i can update single records no problem but have no idea where to start[/color]
> > with[color=darkred]
> > > this one.
> > >
> > > Thanks
> > >
> > >[/color]
> >
> >[/color]
>
>[/color]


Closed Thread