Home » Developer & Programmer » Forms » How to Manage Multiple users (Oracle 9i, Developer 6i, Windows NT)
How to Manage Multiple users [message #341873] Wed, 20 August 2008 12:02 Go to next message
mahatab
Messages: 98
Registered: January 2008
Location: Dhaka
Member

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 #342004 is a reply to message #341873] Thu, 21 August 2008 01:08 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
DON'T let them have the same user number!!

David
Re: How to Manage Multiple users [message #342036 is a reply to message #341873] Thu, 21 August 2008 02:34 Go to previous messageGo to next message
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 Go to previous messageGo to next message
mahatab
Messages: 98
Registered: January 2008
Location: Dhaka
Member

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 #342284 is a reply to message #341873] Thu, 21 August 2008 22:38 Go to previous messageGo to next message
athar.fitfd@hotmail.com
Messages: 193
Registered: October 2007
Location: pakistan
Senior Member
user the following code
in pre-insert and when-create-record trigger of block level.

select nvl(max(srno),0)+1 into :srno from table ;


i hope this will solve the problem.
Re: How to Manage Multiple users [message #342547 is a reply to message #341873] Fri, 22 August 2008 13:46 Go to previous messageGo to next message
mahatab
Messages: 98
Registered: January 2008
Location: Dhaka
Member

Thanks Athar for your valuable information. Let me try on this and i will let you know tomorrow from my office.
Re: How to Manage Multiple users [message #342615 is a reply to message #341873] Sat, 23 August 2008 03:27 Go to previous messageGo to next message
mahatab
Messages: 98
Registered: January 2008
Location: Dhaka
Member

Athar,
I have tried it but no result, both the user showing the same serial number. What to do Now? Any more suggestion? Waiting for your reply.


Thanks, Mahatab
Re: How to Manage Multiple users [message #342677 is a reply to message #342615] Sun, 24 August 2008 00:56 Go to previous messageGo to next message
mudabbir
Messages: 235
Registered: April 2006
Location: Kuwait
Senior Member

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.
Re: How to Manage Multiple users [message #342725 is a reply to message #341873] Sun, 24 August 2008 12:15 Go to previous message
mahatab
Messages: 98
Registered: January 2008
Location: Dhaka
Member

Thanks Mudabbir and all, those who spend their valuable time to share their expertise with me. Let me try Mudabbir Brother on your suggestion and i will let you know tomorrow (25-08-2008).
Previous Topic: Forms 10G Runtime configuration
Next Topic: Freeze the few columns in Horizontal scroll
Goto Forum:
  


Current Time: Mon Dec 05 23:49:30 CST 2016

Total time taken to generate the page: 0.06515 seconds