Corruption In "Browse" Mode?

P

(PeteCresswell)

I just had to re-code some of my forms to speed up load time.

What I did was dispense with caching things in local work tables
as long as the form is not in "Change" mode.

When the user clicks "Change", I cache everything in C:\Temp work
tables as usual and don't hit the back end again until the user
clicks "Save".

But in "Browse" mode now everything is populated just by queries
directly into the back end DB.

Seems logical to me that there wouldn't be any additional risk of
corruption if, for instance, somebody pulls the power cord on the
user's PC bc there aren't any records on said PC in a different
state from what they are in the back end.

But I know almost nothing about what's under the hood.

Can somebody who knows comment?
 
A

Arvin Meyer [MVP]

Hi Pete,

Unless you are using Terminal Services, or a web front-end, all processing
takes place on the workstation. As a result, unless you are using totally
unbound forms, any open record is susceptible to corruption if the form is
"dirty" and the record hasn't been saved. In practice, this rarely happens
except during the write or if there are memo fields being edited on the
form.
 
D

David W. Fenton

What I did was dispense with caching things in local work tables
as long as the form is not in "Change" mode.

I think using temporary work tables for anything other than the
occasional weird situation where you need it for performance reasons
is highly inadvisable. I would be surprised if very many Access
developers use that approach. I've never done it even once for
mainline data entry.
 
T

Tom van Stiphout

On Thu, 21 Aug 2008 20:34:50 -0400, "Arvin Meyer [MVP]" <[email protected]>
wrote:

I presume the OP means with "browse mode" that the form will not
(cannot) be edited. So I think the danger level is near-zero.

-Tom.
Microsoft Access MVP
 
P

(PeteCresswell)

Per David W. Fenton:
anything other than the
occasional weird situation where you need it for performance reasons
is highly inadvisable.

I was never able to figure out any other way of giving the user a
"Save" button and still doing cross-field/cross-table validation
- and popping a list of both "Warning" (screen contents can be
saved, but something's unusual) and "Fatal" (screen contents
cannot be saved until the error is fixed) messages.

Tried a few screens, but they got too convoluted for me and
seemed like they were one step away from the next user request
breaking them.
 
P

(PeteCresswell)

Per Tom van Stiphout:
I presume the OP means with "browse mode" that the form will not
(cannot) be edited. So I think the danger level is near-zero.

The OP does, indeed mean that the form will not allow the user to
edit any fields - and is definitely relieved to hear that the
danger level is low.
 
D

David W. Fenton

Per David W. Fenton:

I was never able to figure out any other way of giving the user a
"Save" button and still doing cross-field/cross-table validation

I've simply never encountered situation where I could *not* do it.
- and popping a list of both "Warning" (screen contents can be
saved, but something's unusual) and "Fatal" (screen contents
cannot be saved until the error is fixed) messages.

Tried a few screens, but they got too convoluted for me and
seemed like they were one step away from the next user request
breaking them.

I'd be interested to know how many others use work tables ike this.
Maybe *I'm* the outlier here!
 
T

Tony Toews [MVP]

(PeteCresswell) said:
Seems logical to me that there wouldn't be any additional risk of
corruption if, for instance, somebody pulls the power cord on the
user's PC bc there aren't any records on said PC in a different
state from what they are in the back end.

In my opinion you're going to needless work. The only time a
corruption has a chance to occur on a bound form is that brief moment
of time when the pencil on the record selector object changes to a
triangle. Or when a bound form creates a new empty record in the
backend.

(I'm ignoring other possibilities such as query updates, recordset
updates and so forth. Just bound forms.)

So a user may have the pencil on the screen but if the power cord is
unplugged during that period of time be it five seconds or twenty
minutes then it's not a problem.

I will add that I've been on site with clients about six or eight
times now when power failures have occurred. They would be running
somewhere between 3 and 25 users in the database. The servers were
on UPSs but the workstations were not.

There wasn't even any need to run compact and repair but once in those
six or eight occurrences.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 
Top