Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Doing a SELECT on a Table Buffered Remote View new recor
Message
From
10/04/2006 07:59:10
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 6 SP5
Database:
Firebird
Miscellaneous
Thread ID:
01110913
Message ID:
01111895
Views:
16
This message has been marked as a message which has helped to the initial question of the thread.
Hi,

you don't need to start a transaction just to enter data. You should actually try to keep the length of time of your transactions to a minimum. The transactions only need to be used when trying to save/update data.

So the process (without fully understanding what you are doing) is:

1. user enters data
2. hits save button
3. your code totals the quantity and checks to see if enough in stock
4. transaction is begun, tableupdate performed and transaction then committed or rolled back.

Even if you want to do the totalling of the quantity in your transaction, it can be done by just starting a second transaction to do the "temporary" tableupdate as we discussed before.

However, if it is that you want to make sure an order is not placed against an item that does not have enough stock, the best thing for you is a rule on the item table to ensure enough stock is there, otherwise, it is possible to get multiple users ordering the same stock at the same time and then you end up out of stock.

>Hi Frank
>
>><bg> What I meant was that if (Codebook you are using isn't it?) has a transaction running, why are you running code to total the quantity at this time? Shouldn't your code be before the Codebook (or whatever the framework is) transaction?
>
>My understanding of transactions is that it has to be started before any data is entered and depending on situation either it is commited or rolled back. Now I required to get a total of the qty. already entered so that further item entry has to be curtailed to allow only so much maximum qty.
>
>Thanks for your continued responses.
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform