473,466 Members | 1,554 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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
Jul 17 '05 #1
3 1692
"Bill H" <maylar69@hot----.com> wrote in message
news:sj********************************@4ax.com...
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


The standard approach is to let your app explode with a nasty error.
Jul 17 '05 #2
On Mon, 23 Aug 2004 22:06:20 -0400, "Chung Leong"
<ch***********@hotmail.com> wrote:
"Bill H" <maylar69@hot----.com> wrote in message
news:sj********************************@4ax.com.. .
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


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

Lol! Too cool, I'm already doing that - job done! ;) :)
Jul 17 '05 #3
>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?
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.
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?


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
Jul 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
by: AMC | last post by:
Hi, I'm using an include file to store the connection string to a database. Whenever I try to reference that string to open a connection in the page that includes the file I get the error 'empy...
0
by: Robert Mazur | last post by:
MySQL 5.0 alpha (binary install) on Solaris 9 -or- RedHat 8.0 mysql-connector-java-3.0.8-stable ----------------------- Is there something different going on with JDBC and the alpha version...
7
by: nydiroth | last post by:
Our servers went down for over 6 hours yesterday and I was asked if there was a way to store the database on the server and a local station at the same time. My datbase is split and the tables...
4
by: dale zhang | last post by:
Hi, I am trying to save and read an image from MS Access DB based on the following article: http://www.vbdotnetheaven.com/Code/Sept2003/2175.asp Right now, I saved images without any...
17
by: Martin Jørgensen | last post by:
Hi, Since I'm a newbie I have some small but quick (probably) stupid questions also :-) This is my "get_double" function which takes a default argument also of type double. The function...
110
by: alf | last post by:
Hi, is it possible that due to OS crash or mysql itself crash or some e.g. SCSI failure to lose all the data stored in the table (let's say million of 1KB rows). In other words what is the worst...
2
by: John Murtari | last post by:
Folks, We are working on upgrading a web based application that allows the user to type quite a long essay and then submit it to the web site for processing. Occasionally, the user will lose...
2
by: dmot | last post by:
I need to save the information from hotel rooms to an array. This array then needs to be saved to a file and then accessed again. Could anyone give me any tips on how to do this? ...
77
by: arnuld | last post by:
1st I think of creating an array of pointers of size 100 as this is the maximum input I intend to take. I can create a fixed size array but in the end I want my array to expand at run-time to fit...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.