updating multiple data into a database - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

updating multiple data into a database

Dear,

I am developing a portal where user can select links from a list of links stored in a database. The fields are linm,link,tag. The tag is a yes/no field. If the tag is true it will display on the index.asp otherwise It will not display. Now suppose a user wants to change the default listing. The He will click a link where all the options will be displayed and he will choose accordingly. Now I want to update the database accordingly. How can I do that. For a single choice I can do that. Please help.

Bidyut.

Comments

  • faustinegeorgefaustinegeorge Posts: 351Member
    "Multiple data" means multiple records or multiple fields ?



    : Dear,
    :
    : I am developing a portal where user can select links from a list of links stored in a database. The fields are linm,link,tag. The tag is a yes/no field. If the tag is true it will display on the index.asp otherwise It will not display. Now suppose a user wants to change the default listing. The He will click a link where all the options will be displayed and he will choose accordingly. Now I want to update the database accordingly. How can I do that. For a single choice I can do that. Please help.
    :
    : Bidyut.
    :

  • faustinegeorgefaustinegeorge Posts: 351Member
    "Multiple data" means multiple records or multiple fields ?



    : Dear,
    :
    : I am developing a portal where user can select links from a list of links stored in a database. The fields are linm,link,tag. The tag is a yes/no field. If the tag is true it will display on the index.asp otherwise It will not display. Now suppose a user wants to change the default listing. The He will click a link where all the options will be displayed and he will choose accordingly. Now I want to update the database accordingly. How can I do that. For a single choice I can do that. Please help.
    :
    : Bidyut.
    :

  • brownbbrownb Posts: 18Member
    Are the link choices global? or user-specific? If the latter, are those being stored in a separate table? What type of HTML fields are the options on the Option page?

    A few ways to skin this asp; you can:
    1. Give your options (on the Option page) meaningful names (eg. opLink1, opLink2,...);
    2. Iterate through your submitted values (For Each val in Request.Form...Next will give you the names of submitted fields) and a. add/update records one at a time(For...UPDATE WHERE link='Link1';...Next), or b. concatenate a string to update all records at once (Next...UPDATE WHERE link in (strLink);).

    If your options are checkboxes, only checked items will be submitted to the form.

    Schema-wise, I would probably opt to have a link table w/ a link ID and link-specific fields, and a separate table in which to specify which links will be displayed.

    : Dear,
    :
    : I am developing a portal where user can select links from a list of links stored in a database. The fields are linm,link,tag. The tag is a yes/no field. If the tag is true it will display on the index.asp otherwise It will not display. Now suppose a user wants to change the default listing. The He will click a link where all the options will be displayed and he will choose accordingly. Now I want to update the database accordingly. How can I do that. For a single choice I can do that. Please help.
    :
    : Bidyut.
    :

  • bidyutbidyut Posts: 4Member
    Dear,
    multiple records. i.e. from a table it will display the linkname and the tag. If the tag is true the links will be displsyed on the index.asp otherwise it will not dispaly. Now I want to update the tag as choose by the user. say there are 10 links and the user choose five out of them now I want to update these five tag in my table. and it will go back to index.asp and it should show those link only which are seleced by the user.

    bidyut.

    : "Multiple data" means multiple records or multiple fields ?
    :
    :
    :
    : : Dear,
    : :
    : : I am developing a portal where user can select links from a list of links stored in a database. The fields are linm,link,tag. The tag is a yes/no field. If the tag is true it will display on the index.asp otherwise It will not display. Now suppose a user wants to change the default listing. The He will click a link where all the options will be displayed and he will choose accordingly. Now I want to update the database accordingly. How can I do that. For a single choice I can do that. Please help.
    : :
    : : Bidyut.
    : :
    :
    :

Sign In or Register to comment.