My scenario is: I have a form to enter master records. The Material Id is the element in that form. The value should be retrieved from the database. Get the latest value from the data base and increment it by 1. The ID should start with 0001.So for the second id it is 0002. This will be a read only field with the value in it while the form is loaded
My question is here how can we achieve Sychronisation? because one or more users can enter the data. If they are doing simulteneously, they may get same Id. so we have sychronise the process util the user insert the date SUCESSFULLY
What database are you using? It should have a safe way to generate surrogate key identifiers. For example Oracle uses sequences.
There is no emoticon for what I am feeling!
Joined: Jul 17, 2005
Hi Jeff Albrechtsen , I am using MySQL 4 Please solve my problem Thanks in advance Prasad
Joined: Sep 16, 2005
I can't *solve* your problem, but I can suggest a few things. I'm a bit rusty on MySQL, but columns can be AUTO_INCREMENT, and there is a function called LAST_INSERT_ID() that returns the last value of an auto increment field. Check your documentation. [ January 06, 2006: Message edited by: Jeff Albrechtsen ]