DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 5 of 5

Thread: Multi-page ASP Transactions

  1. #1
    Dave Kraft Guest

    Multi-page ASP Transactions

    Hi, I'm working on several data-entry screens for a client (a golf course).
    The project I'm working on is a membership systems. I have 3 data entry
    screens, as follows:

    1. Personal information.. first name, last name, mi, spouse's name/mi,
    nickname
    2. Organization(s) & Address(s) Info
    3. Phone Number(s)

    Each form has a corresponding table, and table 2 and 3 have a one-to many
    relationship to table 1 (ie a member can have 1 or more
    addressses/organizations and 1 or more phone numbers). The way I first
    invisioned this working is:

    1. Enter personal info. the data is POST'ed to an ASP page which writes to
    the table, gets the new ID, and redirects to the 2nd screen, passing the id
    as a querystring. The ID then gets plugged into a hidden field. The
    Organization/Address data then gets POST'ed to another ASP page which puts
    the data to the table. in the Onsubmit event of this form, it is asked if
    you want to enter another address. if you respond yes, another hidden field
    gets populated. This field is then checked in the ASP page, and if its
    'yes' (or 1 or whatever), the ASP page redirects back to the previous page
    (with the ID in a querystring of course), allowing multiple addresses. if
    the user answers no, the ASP page redirects to the phone page. Action
    similar to the organiation page occurs for the phone page.

    The problem I can see is that a user could enter the personal data, but not
    the address/phone, or something similar, so I was starting to think about
    transactions. I know that ADO has begintrans, but, you can't close the
    connection in the middle of the transaction. I was then thinking if I could
    somehow use MTS like this:

    1. user first enters a default.asp which starts the transaction and then
    redirects to page 1.
    2. person fills out page 1, the data gets saved
    3. person fills out one or more page 2's, the data gets saved (each time)
    4. person fills out one or more page 3's, the data gets saved (each time)
    5. page 3 redirects to another ASP which then commits the transaciton.

    If there are any errors, or anything unusual between step 1 and the end of
    step 5, the whole transaction is rolled back.

    Is there any way to do this (easily)? And, please, don't say 'VB (or C++)
    COM objects', because I am working on the client's web server remotely, so I
    can't install any dll's.

    TIA

    Dave Kraft
    dkraft@tsrnet.com
    TSR Solutions, Inc.
    My views aren't necessarily my employer's.



  2. #2
    Sergey Guest

    Re: Multi-page ASP Transactions


    I don't think that there's any feasible way to do what you're describing.
    In order to include multiple pages in one transaction you need to cash a
    connection and that's not a good idea.
    I'm thinking you can store the data temporary somewhere (session variables)
    and on final step write everything to the database. Another solution might
    write each step to the database, check the data at the last step and either
    prompt user to enter missing data or delete whatever was written in the previous
    steps.

    Sergey.

    "Dave Kraft" <dkraft@tsrnet.com> wrote:
    >Hi, I'm working on several data-entry screens for a client (a golf course).
    >The project I'm working on is a membership systems. I have 3 data entry
    >screens, as follows:
    >
    >1. Personal information.. first name, last name, mi, spouse's name/mi,
    >nickname
    >2. Organization(s) & Address(s) Info
    >3. Phone Number(s)
    >
    >Each form has a corresponding table, and table 2 and 3 have a one-to many
    >relationship to table 1 (ie a member can have 1 or more
    >addressses/organizations and 1 or more phone numbers). The way I first
    >invisioned this working is:
    >
    >1. Enter personal info. the data is POST'ed to an ASP page which writes

    to
    >the table, gets the new ID, and redirects to the 2nd screen, passing the

    id
    >as a querystring. The ID then gets plugged into a hidden field. The
    >Organization/Address data then gets POST'ed to another ASP page which puts
    >the data to the table. in the Onsubmit event of this form, it is asked

    if
    >you want to enter another address. if you respond yes, another hidden field
    >gets populated. This field is then checked in the ASP page, and if its
    >'yes' (or 1 or whatever), the ASP page redirects back to the previous page
    >(with the ID in a querystring of course), allowing multiple addresses.

    if
    >the user answers no, the ASP page redirects to the phone page. Action
    >similar to the organiation page occurs for the phone page.
    >
    >The problem I can see is that a user could enter the personal data, but

    not
    >the address/phone, or something similar, so I was starting to think about
    >transactions. I know that ADO has begintrans, but, you can't close the
    >connection in the middle of the transaction. I was then thinking if I could
    >somehow use MTS like this:
    >
    >1. user first enters a default.asp which starts the transaction and then
    >redirects to page 1.
    >2. person fills out page 1, the data gets saved
    >3. person fills out one or more page 2's, the data gets saved (each time)
    >4. person fills out one or more page 3's, the data gets saved (each time)
    >5. page 3 redirects to another ASP which then commits the transaciton.
    >
    >If there are any errors, or anything unusual between step 1 and the end

    of
    >step 5, the whole transaction is rolled back.
    >
    >Is there any way to do this (easily)? And, please, don't say 'VB (or C++)
    >COM objects', because I am working on the client's web server remotely,

    so I
    >can't install any dll's.
    >
    >TIA
    >
    >Dave Kraft
    >dkraft@tsrnet.com
    >TSR Solutions, Inc.
    >My views aren't necessarily my employer's.
    >
    >



  3. #3
    Dave Kraft Guest

    Re: Multi-page ASP Transactions

    Thanks for the reply. I was looking over my VBITS Chicago books, and I
    think there's a way I can persist the data I need using DHTML and the
    userData style behavior. The only down side is this then limits me to using
    only IE 5 as a browser.. not sure if the client I'm developing this project
    for will like this.

    Dave Kraft
    dkraft@tsrnet.com
    TSR Solutions, Inc.
    www.tsrnet.com
    My views aren't necessarily my employer's




  4. #4
    suresh Guest

    Re: Multi-page ASP Transactions


    I think the easiest way though circuitus and perhaps even jaded way is to
    store the data in a temporary table and in the final page transfer the temporary
    table to the main table. if not just discard the temporary table data. The
    only overhead copying data form temp table to the main one, but without com
    & other fancy frills this primitive way will work

    Suresh


    "Dave Kraft" <dkraft@tsrnet.com> wrote:
    >Hi, I'm working on several data-entry screens for a client (a golf course).
    >The project I'm working on is a membership systems. I have 3 data entry
    >screens, as follows:
    >
    >1. Personal information.. first name, last name, mi, spouse's name/mi,
    >nickname
    >2. Organization(s) & Address(s) Info
    >3. Phone Number(s)
    >
    >Each form has a corresponding table, and table 2 and 3 have a one-to many
    >relationship to table 1 (ie a member can have 1 or more
    >addressses/organizations and 1 or more phone numbers). The way I first
    >invisioned this working is:
    >
    >1. Enter personal info. the data is POST'ed to an ASP page which writes

    to
    >the table, gets the new ID, and redirects to the 2nd screen, passing the

    id
    >as a querystring. The ID then gets plugged into a hidden field. The
    >Organization/Address data then gets POST'ed to another ASP page which puts
    >the data to the table. in the Onsubmit event of this form, it is asked

    if
    >you want to enter another address. if you respond yes, another hidden field
    >gets populated. This field is then checked in the ASP page, and if its
    >'yes' (or 1 or whatever), the ASP page redirects back to the previous page
    >(with the ID in a querystring of course), allowing multiple addresses.

    if
    >the user answers no, the ASP page redirects to the phone page. Action
    >similar to the organiation page occurs for the phone page.
    >
    >The problem I can see is that a user could enter the personal data, but

    not
    >the address/phone, or something similar, so I was starting to think about
    >transactions. I know that ADO has begintrans, but, you can't close the
    >connection in the middle of the transaction. I was then thinking if I could
    >somehow use MTS like this:
    >
    >1. user first enters a default.asp which starts the transaction and then
    >redirects to page 1.
    >2. person fills out page 1, the data gets saved
    >3. person fills out one or more page 2's, the data gets saved (each time)
    >4. person fills out one or more page 3's, the data gets saved (each time)
    >5. page 3 redirects to another ASP which then commits the transaciton.
    >
    >If there are any errors, or anything unusual between step 1 and the end

    of
    >step 5, the whole transaction is rolled back.
    >
    >Is there any way to do this (easily)? And, please, don't say 'VB (or C++)
    >COM objects', because I am working on the client's web server remotely,

    so I
    >can't install any dll's.
    >
    >TIA
    >
    >Dave Kraft
    >dkraft@tsrnet.com
    >TSR Solutions, Inc.
    >My views aren't necessarily my employer's.
    >
    >



  5. #5
    anotherboringday attheoffice Guest

    Re: Multi-page ASP Transactions


    Hate to break it to you, but you can install components remotely, assuming
    the webserver is configured for it. I'd suggest having them run a properly
    configured application server, first of all - then use VB.


    "Dave Kraft" <dkraft@tsrnet.com> wrote:
    >Hi, I'm working on several data-entry screens for a client (a golf course).
    >The project I'm working on is a membership systems. I have 3 data entry
    >screens, as follows:
    >
    >1. Personal information.. first name, last name, mi, spouse's name/mi,
    >nickname
    >2. Organization(s) & Address(s) Info
    >3. Phone Number(s)
    >
    >Each form has a corresponding table, and table 2 and 3 have a one-to many
    >relationship to table 1 (ie a member can have 1 or more
    >addressses/organizations and 1 or more phone numbers). The way I first
    >invisioned this working is:
    >
    >1. Enter personal info. the data is POST'ed to an ASP page which writes

    to
    >the table, gets the new ID, and redirects to the 2nd screen, passing the

    id
    >as a querystring. The ID then gets plugged into a hidden field. The
    >Organization/Address data then gets POST'ed to another ASP page which puts
    >the data to the table. in the Onsubmit event of this form, it is asked

    if
    >you want to enter another address. if you respond yes, another hidden field
    >gets populated. This field is then checked in the ASP page, and if its
    >'yes' (or 1 or whatever), the ASP page redirects back to the previous page
    >(with the ID in a querystring of course), allowing multiple addresses.

    if
    >the user answers no, the ASP page redirects to the phone page. Action
    >similar to the organiation page occurs for the phone page.
    >
    >The problem I can see is that a user could enter the personal data, but

    not
    >the address/phone, or something similar, so I was starting to think about
    >transactions. I know that ADO has begintrans, but, you can't close the
    >connection in the middle of the transaction. I was then thinking if I could
    >somehow use MTS like this:
    >
    >1. user first enters a default.asp which starts the transaction and then
    >redirects to page 1.
    >2. person fills out page 1, the data gets saved
    >3. person fills out one or more page 2's, the data gets saved (each time)
    >4. person fills out one or more page 3's, the data gets saved (each time)
    >5. page 3 redirects to another ASP which then commits the transaciton.
    >
    >If there are any errors, or anything unusual between step 1 and the end

    of
    >step 5, the whole transaction is rolled back.
    >
    >Is there any way to do this (easily)? And, please, don't say 'VB (or C++)
    >COM objects', because I am working on the client's web server remotely,

    so I
    >can't install any dll's.
    >
    >TIA
    >
    >Dave Kraft
    >dkraft@tsrnet.com
    >TSR Solutions, Inc.
    >My views aren't necessarily my employer's.
    >
    >



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center