How to Manage Multiple users [message #341873] |
Wed, 20 August 2008 12:02 |
|
Hi,
I am working on a Sales system where multiple user may provide input from the same form using different user name. For an Example if user MIS Enter into the system it will get the Serial Number 22 from table Master, So when the user DBA enter into the system it should get the serial number 23 from the same table Master with out saving any data on that table. My system is working fine for a single users but its not working for multiple user (Both users having the same serial number). Can any one please provide me a hints or a piece of code so that i can work on it. For better understanding i am attaching a .fmb file with it. Thanks in Advance.
Mahatab Masud
|
|
|
|
Re: How to Manage Multiple users [message #342036 is a reply to message #341873] |
Thu, 21 August 2008 02:34 |
athar.fitfd@hotmail.com
Messages: 193 Registered: October 2007 Location: pakistan
|
Senior Member |
|
|
Dear
you can user database trigger to create sr no at database level not at the front end.or if you want to show to the user then generate srno at when_create_record and pre_insert triggers of the form both at the same time.
i hope this helps.
bye
Athar
|
|
|
Re: How to Manage Multiple users [message #342066 is a reply to message #341873] |
Thu, 21 August 2008 04:46 |
|
Dear Athar,
Thanks for the advice, But i will be glad if you can describe it more with a piece of code. I will truely appreciate your effort if you can do that for me (The two triggers that needed for creating serial number). Thanks once again.
Mahatab, Bangladesh.
|
|
|
|
|
|
Re: How to Manage Multiple users [message #342677 is a reply to message #342615] |
Sun, 24 August 2008 00:56 |
|
you could try this...
create a table with 1 column
Create table New_Serial
(Internalno number(10));
insert into New_serial values (1);
In your WHEN-NEW-FORM-INSTANCE replace this code
select to_char(nvl(max(to_number(sl_no)),0)) into f from pbl_do.MASTER_SALES2;
:MASTER_SALES.sl_no:= f+1;
with
Select Internalno into f from New_serial;
Update New_serial set Internalno = Internalno+1;
Commit_Form;
:MASTER_SALES.sl_no:= f;
I think this will solve your problem.
|
|
|
|