yeah! I know what you're saying. That sequence is much like the same with the autonumber of Access but you need to execute a select nextval to generate code. I use also use that and my main concern is how to capture(if there is any) the event similar to PRE-INSERT TRIGGER of blocks in Oracle Developer/2000.
I cannot immediately get the sequence since it can't be decreased supposed the user changed his mind in adding records. In that way, your sequence has already incremented although the user haven't really inserted a record yet. Just imagine, if the user clicked on addnew then cancelupdate then addnew then cancelupdate and so on for a hundred times, your sequence has already incremented a hundred times. What if you have 100 users doing that everyday? That's what i'm trying to avoid. I need to fill the fields with codes only after the user trigger the SAVE button so that no matter how many times the user changes his mind, the sequence won't be affected at all.
KWell got my idea. The problem is, i want a more faster and simpler code that would do the job.




Reply With Quote