ASP Web Form - looking for ideas.

Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default ASP Web Form - looking for ideas.

    Hello Group, been lurking for a while now, great source of info. A little
    help if you will?

    I have two tables:
    Applicant1
    Applicant2

    I have one form with details for App1 and App2.

    Can I somehow insert the necessary values from the App1 fields into table1
    and the App2 fields into table2? Does not seem obvious, I have a work
    around which I am going to design should I find no easier way.

    My work around:
    Create the form with both App1 and App2 fields present. onSubmit I shall
    store App1 values in Table1 AND record ALL App2 fields as Session Values. I
    will then redirect to "Table2Parse.asp" and have a hidden form take the
    Session Values and automatically submit them to Table2 and redirect to a
    thank you URL.

    This seems logical to me, I think I can have it done in an hour or so, just
    not sure if this is the best way to proceed.

    Anyone else have any thoughts? I NEED to have two separate tables for
    compatibility reasons, and I don't want to split the data from a third table
    using queries.

    Thanks for any advice offered!

    Gary Whittle.
    [url]www.24it.co.uk[/url] - site officially launching soon.


    Gary Guest

  2. Similar Questions and Discussions

    1. Any ideas?
      Hi Does anybody know how the animation on the following website was done? I know that masking and a certain amount of tweening was used, but...
    2. other ideas
      Any other suggestions? Please see previous post for code.
    3. X ideas
      Hello Looking to run X windows on a debian 3.0 for a older machine with a 4 meg video. Its for a server so i want a smallest x server to take up...
    4. Any ideas on this?
      How would i go about creating this? I have a table, within each cell there is an image spacer set to 20 x 20 px the same dimensions of the...
    5. Any ideas on how this is done?
      Nice content manager, looking for ideas on how it is made... http://www.101ltd.com/smartwebb/smartcontent/smartcontent.asp -- Seth Meranda...
  3. #2

    Default Re: ASP Web Form - looking for ideas.

    No, no, no, no, no.

    Why bother submitting to a second page? Please provide some details about
    a) the database type(s) and version(s) - this should be de rigeur on a db
    list
    b) the locations of table1 and table2 - are they in separate databases?
    separate servers?

    hint: you can open multiple connections on the same page if necessary. You
    can even close a connection and reopen it with a different connection string
    if that's necessary. I don't know what you need to do without the above
    information.

    Bob Barrows


    Gary wrote:
    > Hello Group, been lurking for a while now, great source of info. A
    > little help if you will?
    >
    > I have two tables:
    > Applicant1
    > Applicant2
    >
    > I have one form with details for App1 and App2.
    >
    > Can I somehow insert the necessary values from the App1 fields into
    > table1 and the App2 fields into table2? Does not seem obvious, I
    > have a work around which I am going to design should I find no easier
    > way.
    >
    > My work around:
    > Create the form with both App1 and App2 fields present. onSubmit I
    > shall store App1 values in Table1 AND record ALL App2 fields as
    > Session Values. I will then redirect to "Table2Parse.asp" and have a
    > hidden form take the Session Values and automatically submit them to
    > Table2 and redirect to a thank you URL.
    >
    > This seems logical to me, I think I can have it done in an hour or
    > so, just not sure if this is the best way to proceed.
    >
    > Anyone else have any thoughts? I NEED to have two separate tables for
    > compatibility reasons, and I don't want to split the data from a
    > third table using queries.
    >
    > Thanks for any advice offered!
    >
    > Gary Whittle.
    > [url]www.24it.co.uk[/url] - site officially launching soon.


    Bob Barrows Guest

  4. #3

    Default Re: ASP Web Form - looking for ideas.

    Hello.

    MySQL database, 2 tables in same database.
    I will try and put your logic to the test, see how far I get :)

    Thanks,

    Gary.

    "Bob Barrows" <reb_01501@yahoo.com> wrote in message
    news:eVHv1fIQDHA.2852@tk2msftngp13.phx.gbl...
    > No, no, no, no, no.
    >
    > Why bother submitting to a second page? Please provide some details about
    > a) the database type(s) and version(s) - this should be de rigeur on a db
    > list
    > b) the locations of table1 and table2 - are they in separate databases?
    > separate servers?
    >
    > hint: you can open multiple connections on the same page if necessary. You
    > can even close a connection and reopen it with a different connection
    string
    > if that's necessary. I don't know what you need to do without the above
    > information.
    >
    > Bob Barrows
    >
    >
    > Gary wrote:
    > > Hello Group, been lurking for a while now, great source of info. A
    > > little help if you will?
    > >
    > > I have two tables:
    > > Applicant1
    > > Applicant2
    > >
    > > I have one form with details for App1 and App2.
    > >
    > > Can I somehow insert the necessary values from the App1 fields into
    > > table1 and the App2 fields into table2? Does not seem obvious, I
    > > have a work around which I am going to design should I find no easier
    > > way.
    > >
    > > My work around:
    > > Create the form with both App1 and App2 fields present. onSubmit I
    > > shall store App1 values in Table1 AND record ALL App2 fields as
    > > Session Values. I will then redirect to "Table2Parse.asp" and have a
    > > hidden form take the Session Values and automatically submit them to
    > > Table2 and redirect to a thank you URL.
    > >
    > > This seems logical to me, I think I can have it done in an hour or
    > > so, just not sure if this is the best way to proceed.
    > >
    > > Anyone else have any thoughts? I NEED to have two separate tables for
    > > compatibility reasons, and I don't want to split the data from a
    > > third table using queries.
    > >
    > > Thanks for any advice offered!
    > >
    > > Gary Whittle.
    > > [url]www.24it.co.uk[/url] - site officially launching soon.
    >
    >
    >

    Gary Guest

  5. #4

    Default Re: ASP Web Form - looking for ideas.

    "Gary" <gary@nospam.co.uk> wrote in message
    news:mSxMa.916$jE1.7119875@news-text.cableinet.net...
    > Hello Group, been lurking for a while now, great source of info. A
    little
    > help if you will?
    >
    > I have two tables:
    > Applicant1
    > Applicant2
    >
    > I have one form with details for App1 and App2.
    >
    > Can I somehow insert the necessary values from the App1 fields into
    table1
    > and the App2 fields into table2? Does not seem obvious, I have a work
    > around which I am going to design should I find no easier way.
    >
    > My work around:
    > Create the form with both App1 and App2 fields present. onSubmit I
    shall
    > store App1 values in Table1 AND record ALL App2 fields as Session
    Values. I
    > will then redirect to "Table2Parse.asp" and have a hidden form take
    the
    > Session Values and automatically submit them to Table2 and redirect to
    a
    > thank you URL.
    >
    > This seems logical to me, I think I can have it done in an hour or so,
    just
    > not sure if this is the best way to proceed.
    >
    > Anyone else have any thoughts? I NEED to have two separate tables for
    > compatibility reasons, and I don't want to split the data from a third
    table
    > using queries.
    >
    > Thanks for any advice offered!
    >
    > Gary Whittle.
    > [url]www.24it.co.uk[/url] - site officially launching soon.
    >
    >
    What database? What version? What do the tables look like? What data
    need to be inserted into each table? Without these particulars it's
    difficult to provide a cogent response. Here's some pseudo code:

    <-- Begin InsertApp1ANDApp2.asp -->
    On Error Resume Next
    Dim cn,strMsg,oError,strURL
    Set cn=CreateObject("ADODB.Connection")
    With cn
    ..Open strConn <-- your connection string here
    ..BeginTrans
    'Call stored procedure perform an insert on App1
    ..spApp1Insert _
    Request.Form("App1Value1"),_
    Request.Form("App1Value2"),_
    Request.Form("App1Value3"),_
    Request.Form("App1Value4")

    'Call stored procedure perform an insert on App2
    ..spApp2Insert _
    Request.Form("App2Value1"),_
    Request.Form("App2Value2"),_
    Request.Form("App2Value3"),_
    Request.Form("App2Value4")

    'If an error was encountered rollback the transaction
    'and generate the error message
    If Err Then
    ..RollbackTrans
    strMsg = strMsg & "Insert failed with the following error(s):" & vbCRLF
    strMsg = strMsg & Err.Description & vbCRLF
    For Each oError In .Errors
    strMsg = strMsg & oError.Description & vbCRLF
    Next
    strURL = "InsertFailure.asp"

    'If no error were encountered commit the transaction
    'and generate a confirmation message
    Else
    ..CommitTrans
    strMsg = "Insert Succeeded"
    strURL = "InsertSuccess.asp"
    End If
    End With
    cn.Close : Set cn = nothing

    'Store message in session variable so it can be accessed
    'on the next page and redirect accordingly.
    Session("Message") = strMsg
    Response.Redirect strURL
    <-- End InsertApp1ANDApp2.asp -->



    Chris Hohmann Guest

  6. #5

    Default Re: ASP Web Form - looking for ideas.

    You don't even need a separate connection. Both tables are in the same
    database. Just run two insert or update statements (whichever is relevant),
    each pointing at the appropriate table.

    Where did you get the idea that you could only perform a single database
    action per page? If it was a book, we need to know so we can advise people
    not to read that book? :-)

    Gary wrote:
    > Hello.
    >
    > MySQL database, 2 tables in same database.
    > I will try and put your logic to the test, see how far I get :)
    >
    > Thanks,
    >
    > Gary.
    >
    > "Bob Barrows" <reb_01501@yahoo.com> wrote in message
    > news:eVHv1fIQDHA.2852@tk2msftngp13.phx.gbl...
    >> No, no, no, no, no.
    >>
    >> Why bother submitting to a second page? Please provide some details
    >> about a) the database type(s) and version(s) - this should be de
    >> rigeur on a db list
    >> b) the locations of table1 and table2 - are they in separate
    >> databases? separate servers?
    >>
    >> hint: you can open multiple connections on the same page if
    >> necessary. You can even close a connection and reopen it with a
    >> different connection string if that's necessary. I don't know what
    >> you need to do without the above information.
    >>
    >> Bob Barrows
    >>
    >>
    >> Gary wrote:
    >>> Hello Group, been lurking for a while now, great source of info. A
    >>> little help if you will?
    >>>
    >>> I have two tables:
    >>> Applicant1
    >>> Applicant2
    >>>
    >>> I have one form with details for App1 and App2.
    >>>
    >>> Can I somehow insert the necessary values from the App1 fields into
    >>> table1 and the App2 fields into table2? Does not seem obvious, I
    >>> have a work around which I am going to design should I find no
    >>> easier way.
    >>>
    >>> My work around:
    >>> Create the form with both App1 and App2 fields present. onSubmit I
    >>> shall store App1 values in Table1 AND record ALL App2 fields as
    >>> Session Values. I will then redirect to "Table2Parse.asp" and have
    >>> a hidden form take the Session Values and automatically submit them
    >>> to Table2 and redirect to a thank you URL.
    >>>
    >>> This seems logical to me, I think I can have it done in an hour or
    >>> so, just not sure if this is the best way to proceed.
    >>>
    >>> Anyone else have any thoughts? I NEED to have two separate tables
    >>> for compatibility reasons, and I don't want to split the data from a
    >>> third table using queries.
    >>>
    >>> Thanks for any advice offered!
    >>>
    >>> Gary Whittle.
    >>> [url]www.24it.co.uk[/url] - site officially launching soon.


    Bob Barrows Guest

  7. #6

    Default Re: ASP Web Form - looking for ideas.

    I am self taught, learning the ropes as I go - newsgroups are always great
    help :)

    Thanks,

    Gary.



    "Bob Barrows" <reb_01501@yahoo.com> wrote in message
    news:epbxqrIQDHA.1148@TK2MSFTNGP11.phx.gbl...
    > You don't even need a separate connection. Both tables are in the same
    > database. Just run two insert or update statements (whichever is
    relevant),
    > each pointing at the appropriate table.
    >
    > Where did you get the idea that you could only perform a single database
    > action per page? If it was a book, we need to know so we can advise people
    > not to read that book? :-)
    >
    > Gary wrote:
    > > Hello.
    > >
    > > MySQL database, 2 tables in same database.
    > > I will try and put your logic to the test, see how far I get :)
    > >
    > > Thanks,
    > >
    > > Gary.
    > >
    > > "Bob Barrows" <reb_01501@yahoo.com> wrote in message
    > > news:eVHv1fIQDHA.2852@tk2msftngp13.phx.gbl...
    > >> No, no, no, no, no.
    > >>
    > >> Why bother submitting to a second page? Please provide some details
    > >> about a) the database type(s) and version(s) - this should be de
    > >> rigeur on a db list
    > >> b) the locations of table1 and table2 - are they in separate
    > >> databases? separate servers?
    > >>
    > >> hint: you can open multiple connections on the same page if
    > >> necessary. You can even close a connection and reopen it with a
    > >> different connection string if that's necessary. I don't know what
    > >> you need to do without the above information.
    > >>
    > >> Bob Barrows
    > >>
    > >>
    > >> Gary wrote:
    > >>> Hello Group, been lurking for a while now, great source of info. A
    > >>> little help if you will?
    > >>>
    > >>> I have two tables:
    > >>> Applicant1
    > >>> Applicant2
    > >>>
    > >>> I have one form with details for App1 and App2.
    > >>>
    > >>> Can I somehow insert the necessary values from the App1 fields into
    > >>> table1 and the App2 fields into table2? Does not seem obvious, I
    > >>> have a work around which I am going to design should I find no
    > >>> easier way.
    > >>>
    > >>> My work around:
    > >>> Create the form with both App1 and App2 fields present. onSubmit I
    > >>> shall store App1 values in Table1 AND record ALL App2 fields as
    > >>> Session Values. I will then redirect to "Table2Parse.asp" and have
    > >>> a hidden form take the Session Values and automatically submit them
    > >>> to Table2 and redirect to a thank you URL.
    > >>>
    > >>> This seems logical to me, I think I can have it done in an hour or
    > >>> so, just not sure if this is the best way to proceed.
    > >>>
    > >>> Anyone else have any thoughts? I NEED to have two separate tables
    > >>> for compatibility reasons, and I don't want to split the data from a
    > >>> third table using queries.
    > >>>
    > >>> Thanks for any advice offered!
    > >>>
    > >>> Gary Whittle.
    > >>> [url]www.24it.co.uk[/url] - site officially launching soon.
    >
    >
    >

    Gary Whittle Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139