Solved

Immediate Updates on Table

Posted on 2000-04-01
8
217 Views
Last Modified: 2010-05-02
I am using VB with Access in Windows NT.
How to Update Records Immediately?

I am Working with Stock Program When two user make the sales for same item. Stock goes negative.
0
Comment
Question by:ackid32
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 3

Expert Comment

by:altena
ID: 2675985
Issue an SQL update command.

Send a SQL statement such as:

UPDATE STOCK_TABLE
    set stock_level = stock_level -100
  where stock_id = 9987

Good luck.
0
 
LVL 3

Accepted Solution

by:
vikiing earned 50 total points
ID: 2676724
If two different stations address the same product, both will think "There are 50 units of this", then one will sell 40, and the other will sell 30, leaving, in both cases the wrong value for the remaining stock.

To handle that situation, you need a semaphore which indicates when a certain record is available to use. If semaphore indicates a certain resource (in this case, the item record) is locked, then you must wait until the record is unlocked (the other application fress the record once it was updated).

Some data base managing systems handle semaphores automatically (which are intended for multi-modifying-users access); some others, simply not, and therefore, you must develope the concurrency control.


0
 

Author Comment

by:ackid32
ID: 2683181
Vikiing
im using Access as backend and how can i use semaphores
0
 
LVL 3

Expert Comment

by:darinw
ID: 2900354
Reviewing question.

darinw
Customer Service
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 3

Expert Comment

by:darinw
ID: 3641874
Hello everyone,

ackid32 -

When you post a question you are forming an alliance with the Experts. You present your problem, your allies try to help you solving your problem. In your alliance, you must let your allies know your strategic information so that the battle can be won favorably.

So far, your allies are loosing the war because you aren't holding up your end of the bargain. They post tactical information but you never respond. They ask for air cover and no planes show up.

As I said in one of your question posts before, you must respond to the Experts when they post a comment that contains a question for you.

If a solution is presented, by way of comment or answer, you must evaluate it and report back on your findings.

You need to bring your alliance to a close for each question by either accepting an answer or deleting the question.

Here is a list of the open questions you have:

===
[This group of questions require your input]
"How to get Uniq No for Masters?"
http://www.experts-exchange.com/jsp/qShow.jsp?ta=vbdatabases&qid=10317243

"Anywhere Banking"
http://www.experts-exchange.com/jsp/qShow.jsp?ta=vbdatabases&qid=10597901

"Refresh Intervel"
http://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=10321556

"How to detect a Hotkey"
http://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=10366318

===

[This one appears to have been abandoned by the Experts - if you wish I can delete it and refund your points]
"Immediate Updates on Table"
http://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=10321222

===

darinw
Customer Service
0
 

Author Comment

by:ackid32
ID: 3680283
Comment accepted as answer
0
 

Author Comment

by:ackid32
ID: 3680284
pls reply me
0
 
LVL 3

Expert Comment

by:vikiing
ID: 3687092
Semaphores are special indicators which handle the way a multiple-users transaction is carried over. As a rule, the own DBMS handles them, this is, the data base management system is who "serializes" concurrent transactions to execute one at a time, as if they weren't performed simultaneously.

But if your DBMS doesn't use them, then you must implement the semaphore scheme by yourself. Read some data base literature.

Thanks x the points.
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now