Stuck on idea! (1 Viewer)

Scolds

Registered User.
Local time
Today, 09:52
Joined
May 19, 2004
Messages
15
I have to create a db that will log the sales of items. The whole prcess of selection must not be written to the db until the payment has been received. So it is really how to select the items display the total for goods etc, with the final click to confirm the sale. Maybe someone has a sample db I could see. Any suggestions would be much appreciated.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 02:52
Joined
Feb 28, 2001
Messages
27,515
In larger databases, such as ORACLE and some others, you do this with a begin/commit sequence.

To do it simple-mindedly in Access, you create a temporary table (or set of tables) that exactly mirror the structure (but not the contents) of your main data tables.

When you create a transaction, you create it in the temp tables.

When you commit a transaction you (1) do a direct update query, temp-table to corresponding main table, for each involved table. (Probably invoice number and detail lines, but could be worse.) Then (2) erase the associated records from the temp table.

You display from the temp tables. You do your long-term reports from the main tables. And, except underneath the commit button, never the twain shall meet.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 03:52
Joined
Feb 19, 2002
Messages
43,768
You also need to deal with orphaned transactions and multi-users so this solution can become complex.
 

Users who are viewing this thread

Top Bottom