Saving input in case of DB connection failure

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bill H

    Saving input in case of DB connection failure

    I'm really new to Internet apps and such sorry, if this is a "duh"
    question.

    What is the standard approach to saving input from a form if on submit
    the database connection fails?

    I'm thinking along the lines of after the submit the first thing to do
    is save the text somewhere (cookie?) and then check for the presence
    of the cookie on the form page and if it exists load the text from it.
    Destroying the cookie after a successful insert. Am I close or is
    there a better way?

    MySQL 3.23

    TIA!
    Bill


  • Chung Leong

    #2
    Re: Saving input in case of DB connection failure

    "Bill H" <maylar69@hot----.com> wrote in message
    news:sj6ki0ddad dlq3h607i6u1b4a knpa6rp91@4ax.c om...[color=blue]
    > I'm really new to Internet apps and such sorry, if this is a "duh"
    > question.
    >
    > What is the standard approach to saving input from a form if on submit
    > the database connection fails?
    >
    > I'm thinking along the lines of after the submit the first thing to do
    > is save the text somewhere (cookie?) and then check for the presence
    > of the cookie on the form page and if it exists load the text from it.
    > Destroying the cookie after a successful insert. Am I close or is
    > there a better way?
    >
    > MySQL 3.23
    >
    > TIA!
    > Bill
    >[/color]

    The standard approach is to let your app explode with a nasty error.


    Comment

    • Bill H

      #3
      Re: Saving input in case of DB connection failure

      On Mon, 23 Aug 2004 22:06:20 -0400, "Chung Leong"
      <chernyshevsky@ hotmail.com> wrote:
      [color=blue]
      >"Bill H" <maylar69@hot----.com> wrote in message
      >news:sj6ki0dda ddlq3h607i6u1b4 aknpa6rp91@4ax. com...[color=green]
      >> I'm really new to Internet apps and such sorry, if this is a "duh"
      >> question.
      >>
      >> What is the standard approach to saving input from a form if on submit
      >> the database connection fails?
      >>
      >> I'm thinking along the lines of after the submit the first thing to do
      >> is save the text somewhere (cookie?) and then check for the presence
      >> of the cookie on the form page and if it exists load the text from it.
      >> Destroying the cookie after a successful insert. Am I close or is
      >> there a better way?
      >>
      >> MySQL 3.23
      >>
      >> TIA!
      >> Bill
      >>[/color]
      >
      >The standard approach is to let your app explode with a nasty error.
      >[/color]
      Lol! Too cool, I'm already doing that - job done! ;) :)

      Comment

      • Gordon Burditt

        #4
        Re: Saving input in case of DB connection failure

        >I'm really new to Internet apps and such sorry, if this is a "duh"[color=blue]
        >question.
        >
        >What is the standard approach to saving input from a form if on submit
        >the database connection fails?[/color]

        If this is a form that actually DOES something, like creating an
        account or purchasing something, it is important that the form make
        clear to the user one of two results: (a) it worked, here's the
        confirmation info, OR (b) it didn't work, please try again later.
        (or if the problem is with what the user submitted, tell him
        to correct it and try again immediately).

        It is very important that the form avoids LYING to the user (telling
        him it worked when it didn't (lost customer), or vice versa (double
        billed customer), and it is also important that it avoid telling
        the user "well, duh, it mighta worked or might not have", leaving
        the user wondering whether he should resubmit the data.
        [color=blue]
        >I'm thinking along the lines of after the submit the first thing to do
        >is save the text somewhere (cookie?) and then check for the presence
        >of the cookie on the form page and if it exists load the text from it.
        >Destroying the cookie after a successful insert. Am I close or is
        >there a better way?[/color]

        It worked or it didn't. No half way. You can let the user submit
        again (but database maintenance tends to take half an hour or longer,
        not seconds). But don't attempt to save it for later after the
        user's left and can't find out whether it worked.

        Gordon L. Burditt

        Comment

        Working...