Temporarirly storing web form data to be inserted into Database ?

Discussion in 'ASP .Net' started by =?Utf-8?B?U2FrZXQgTXVuZHJh?=, Mar 31, 2005.

  1. I have a web application with two forms. After user enters data in first form
    he is directed to the second form. After Filling the second form as he clicks
    on save button, the data entered is stored in the database using a
    Transaction Object, That inserts data, entered by user in both the forms, in
    the database.

    My problem is where shall i store the data entered by the user in the first
    form when he is redirected to next form and till i perform the transaction?
    --
    Thank You.

    Saket Mundra
    =?Utf-8?B?U2FrZXQgTXVuZHJh?=, Mar 31, 2005
    #1
    1. Advertising

  2. =?Utf-8?B?U2FrZXQgTXVuZHJh?=

    Joseph Byrns Guest

    In a Session :

    Session("TemporaryData") = DatatableContainingTemporaryData


    "Saket Mundra" <> wrote in message
    news:...
    >I have a web application with two forms. After user enters data in first
    >form
    > he is directed to the second form. After Filling the second form as he
    > clicks
    > on save button, the data entered is stored in the database using a
    > Transaction Object, That inserts data, entered by user in both the forms,
    > in
    > the database.
    >
    > My problem is where shall i store the data entered by the user in the
    > first
    > form when he is redirected to next form and till i perform the
    > transaction?
    > --
    > Thank You.
    >
    > Saket Mundra
    Joseph Byrns, Mar 31, 2005
    #2
    1. Advertising

  3. =?Utf-8?B?U2FrZXQgTXVuZHJh?=

    Brock Allen Guest

    The question is can your users deal with the potential for the loss od data
    from page 1 to page 2? If not, then store the data in the database inbetween
    the pages, in a temp save table, perhaps. If they can deal with the possibility
    of loss of data, then Session state is an acceptable place to store state
    across pages.

    -Brock
    DevelopMentor
    http://staff.develop.com/ballen



    > I have a web application with two forms. After user enters data in
    > first form he is directed to the second form. After Filling the second
    > form as he clicks on save button, the data entered is stored in the
    > database using a Transaction Object, That inserts data, entered by
    > user in both the forms, in the database.
    >
    > My problem is where shall i store the data entered by the user in the
    > first form when he is redirected to next form and till i perform the
    > transaction?
    >
    > Saket Mundra
    >
    Brock Allen, Mar 31, 2005
    #3
  4. Re: Temporarirly storing web form data to be inserted into Databas

    Thank you for the replies.
    I understand that the data can be stored in Session variables or temporary
    tables.

    However, say if i have more then 6 forms in which the user enters the data
    one by one and after entering the data on last form he saves it. At this
    point in time i am saving the data in the database through a transaction.

    So, now the question arises is it advisable to create so many temporary
    tables or Session variables for each form before the transaction takes place.

    The most important point is the user cannot afford to lose data between forms.
    Please Help.

    Saket Mundra

    "Brock Allen" wrote:

    > The question is can your users deal with the potential for the loss od data
    > from page 1 to page 2? If not, then store the data in the database inbetween
    > the pages, in a temp save table, perhaps. If they can deal with the possibility
    > of loss of data, then Session state is an acceptable place to store state
    > across pages.
    >
    > -Brock
    > DevelopMentor
    > http://staff.develop.com/ballen
    >
    >
    >
    > > I have a web application with two forms. After user enters data in
    > > first form he is directed to the second form. After Filling the second
    > > form as he clicks on save button, the data entered is stored in the
    > > database using a Transaction Object, That inserts data, entered by
    > > user in both the forms, in the database.
    > >
    > > My problem is where shall i store the data entered by the user in the
    > > first form when he is redirected to next form and till i perform the
    > > transaction?
    > >
    > > Saket Mundra
    > >

    >
    >
    >
    >
    =?Utf-8?B?U2FrZXQgTXVuZHJh?=, Mar 31, 2005
    #4
  5. =?Utf-8?B?U2FrZXQgTXVuZHJh?=

    Brock Allen Guest

    Re: Temporarirly storing web form data to be inserted into Databas

    > The most important point is the user cannot afford to lose data
    > between forms. Please Help.


    Then you've just answered it -- you must save it between forms. Then once
    the user is done with all the forms, then move all the data to your "real"
    tables within your transaction.

    -Brock
    DevelopMentor
    http://staff.develop.com/ballen
    Brock Allen, Mar 31, 2005
    #5
  6. Re: Temporarirly storing web form data to be inserted into Databas

    Thanx again for your reply Brock.

    I got your point and thuis is what I have been doing. Its just that i am
    looking for something more comprehensive. And moreover, i want to get away
    with writing all the code required to save the data in temporary tables and
    then in real Database.

    Also I am quite unsure about the memory this technique will consume, Is
    there no other way to do so but to create temporary tables for each of the
    forms.

    Thank you.

    Saket

    "Brock Allen" wrote:

    > > The most important point is the user cannot afford to lose data
    > > between forms. Please Help.

    >
    > Then you've just answered it -- you must save it between forms. Then once
    > the user is done with all the forms, then move all the data to your "real"
    > tables within your transaction.
    >
    > -Brock
    > DevelopMentor
    > http://staff.develop.com/ballen
    >
    >
    >
    >
    =?Utf-8?B?U2FrZXQgTXVuZHJh?=, Mar 31, 2005
    #6
  7. =?Utf-8?B?U2FrZXQgTXVuZHJh?=

    Joseph Byrns Guest

    Re: Temporarirly storing web form data to be inserted into Databas

    The tables idea is the most robust. It should take no extra storage doing
    it this way as in your transaction you would move the data from the
    temporary tables to the permanent tables, so no space lost.


    "Saket Mundra" <> wrote in message
    news:D...
    > Thanx again for your reply Brock.
    >
    > I got your point and thuis is what I have been doing. Its just that i am
    > looking for something more comprehensive. And moreover, i want to get away
    > with writing all the code required to save the data in temporary tables
    > and
    > then in real Database.
    >
    > Also I am quite unsure about the memory this technique will consume, Is
    > there no other way to do so but to create temporary tables for each of the
    > forms.
    >
    > Thank you.
    >
    > Saket
    >
    > "Brock Allen" wrote:
    >
    >> > The most important point is the user cannot afford to lose data
    >> > between forms. Please Help.

    >>
    >> Then you've just answered it -- you must save it between forms. Then once
    >> the user is done with all the forms, then move all the data to your
    >> "real"
    >> tables within your transaction.
    >>
    >> -Brock
    >> DevelopMentor
    >> http://staff.develop.com/ballen
    >>
    >>
    >>
    >>
    Joseph Byrns, Apr 1, 2005
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page