Server and Stations Problem [message #641939] |
Thu, 27 August 2015 14:39 |
|
amjad_alahdal
Messages: 102 Registered: October 2013 Location: Saudi Arabia
|
Senior Member |
|
|
Hello guys,
Guys, I am making a test program to test the network and how to connect clients to the server.
Currently, I have Oracle database 10g in a server.
I created a table TestA ( Id_no, Name).
Then, I created a form for that table. the Id_No is supposed to be an auto_generated_number. In my form I have the following buttons :
Add , Save.
In Station 1, if he clicks on add the id_no is generated as the followings :
declare
check_max number ;
begin
select MAX(ID_NO) into check_max from test A ;
:TestA.ID_NO := max_no + 1 ;
commit_form ; -- I used this line to make sure that whenever the user clicks on add the number is saved so if the person in station 2 click add it gives him the next max number.
in the save button I used the following code :
commit_form ;
I don't have problem generating the serial number which is auto_increment.
I have having problem when 2 or more stations are working in the same time.
If Station 1 finished completing the value of the other column and he clicked on Save.
The program freezes. The person in Station 2 should stop working in what he was doing and he should commit his work so the other person can add a new record.
In addition,
the table ower's is A. In both stations, they use the username A.
I hope you could understand my problem. if you need more information. I can fill you with it.
|
|
|
|
|
|
|
|