Skip to main content
Inspiring
January 28, 2007
Question

Updating a database...ASP / VBS /Access

  • January 28, 2007
  • 2 replies
  • 207 views
Hi Guys,

Id like to update a couple of fields in the database, in doing so it changes the location a file shows in a list of files..

Recently when i did this I pass the ID from one page to the update page which grabs the required record--allow the user to make the change via a form and hit update.
This works.

But now I have a list box that goes to a table in the database and brings back a field to display in the list. Now here I can set the value the list box returns but I need to grab the value returned and its ID

So my list box at run time shows a list.... Boys > Girls etc etc and the values I need are the strings it returns in its list 'Boys' or 'Girls' as well as their ID values in the table.

The list box only allows me to return one value?,

Any suggestions would be welcomes, my only thoughts would be to start a 3rd page that gets the valuse past to it and grab the other needed ID then do the update but that means asking the user to click a further button to do this eh?

Thanks for any thoughts.
Tag
This topic has been closed for replies.

2 replies

Tag2007Author
Inspiring
January 29, 2007
Hi Paul,
Im not sure I follow?
Do you mean the recordset that binds to the list box will have the same values.
Say the user changes the list box to whats there on loading the page and picks a category from it , it then sets the list box value to the ID that I need, so to get the other value I need just to insert the equivilant field from the list boxs feeding recordset and it will match whats been selected?

Thanks again for your reply.
Tag
Inspiring
January 29, 2007
On your update page simple define the list that fields the dropdown and then
bind the one from the recordset to it as the selected item.

--
Paul Whitham
Certified Dreamweaver MX2004 Professional
Adobe Community Expert - Dreamweaver

Valleybiz Internet Design
www.valleybiz.net

"Tag2007" <webforumsuser@macromedia.com> wrote in message
news:epiqag$75s$1@forums.macromedia.com...
> Hi Guys,
>
> Id like to update a couple of fields in the database, in doing so it
> changes
> the location a file shows in a list of files..
>
> Recently when i did this I pass the ID from one page to the update page
> which
> grabs the required record--allow the user to make the change via a form
> and hit
> update.
> This works.
>
> But now I have a list box that goes to a table in the database and brings
> back
> a field to display in the list. Now here I can set the value the list box
> returns but I need to grab the value returned and its ID
>
> So my list box at run time shows a list.... Boys > Girls etc etc and
> the
> values I need are the strings it returns in its list 'Boys' or 'Girls'
> as
> well as their ID values in the table.
>
> The list box only allows me to return one value?,
>
> Any suggestions would be welcomes, my only thoughts would be to start a
> 3rd
> page that gets the valuse past to it and grab the other needed ID then do
> the
> update but that means asking the user to click a further button to do this
> eh?
>
> Thanks for any thoughts.
> Tag
>