Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with Table Update in Multi User environment
Message
From
18/06/2001 00:05:56
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Problem with Table Update in Multi User environment
Miscellaneous
Thread ID:
00520441
Message ID:
00520441
Views:
47
Problem with UPDATING TABLE in a multi-user environment.

I'm developing a multi-user application for Money Changer using VFP 5.0.
I DON'T USE DATABASE CONTAINER, all my tables are free tables with CDX files.

I have used FLOCK() and UNLOCK ALL but the problem still frequently occurs.

My application program name: FOREX1.EXE (on WindowsNT 4.0 server)

Table Name: MSTCURR.DBF
Fieldname: CURR1 (indexed)
BALANCE1
balance1 contains the current balance of each currency.

Table Name: TRX1.DBF
Fieldname: Cashier_NO
VOUCHER_NO
TRX_DATE
TRX_TYPE may contains "SELL" or "BUY "
CURR1
AMOUNT

Both tables are on NT server in the same folder as FOREX1.EXE
There are 8 computers running FOREX1.EXE concurrently.

e.g.:
1. CURR1 = 'USD' and TRX_TYPE = 'SELL' and AMOUNT = 175 then
the program will DEDUCT BALANCE1 of USD in MSTCURR by 175.
2. CURR1 = 'AUD' and TRX_TYPE = 'BUY ' and AMOUNT = 500 then
the program will ADD 500 to BALANCE1 of AUD in MSTCURR.

The problem is OFTEN the DEDUCTION or ADDITION process is NOT RIGHT.

Problem example: USD beginning balance = 20,000

Cashier_NO, VOUCHER_NO, TRX_TYPE, CURR1, AMOUNT -->> BALANCE1
3, 001, SELL, USD, 700 -->> 19,300
1, 002, SELL, USD, 500 -->> 18,800
2, 003, SELL, USD, 200 -->> 19,100 --> WRONG RESULT ?

This problem can happen not only to USD but other currencies as well.

Could this problem related with bad network cabling or the NT server?

Thank you so much for your kind help,
Best Regards,
Next
Reply
Map
View

Click here to load this message in the networking platform