|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
You don't need a fax machine to get faxes. Get a fax-to-email fax number from CallWave. Try it free.
|
|
#1
|
|||
|
|||
|
problem while insert into
dear sir
i have a button on a form. behind that button i have one select statement and othe insert into statement after one an other if i run only insert statement it works but if i run select statement first and after that an insert statement , it gives error cannot insert. please help me for that problem raza |
|
#2
|
|||
|
|||
|
You did not exaplain about your queries, are you running the query and inserting data into same table or different tables?. How many blocks you have in the form? where you have defined that button, in the master/detail block or somewhere else? As I understand it suppose to work, might be you are inserting insufficient values or may be your table is locked that time, you need more investigation.
I have the same kind of code in one of my master detail form form see below: trigger : WHEN-BUTTON-PRESSED commit form; -- save data into master table DECLARE x number; BEGIN SELECT count(*) INTO x FROM emp WHERE deptno=:dpt.deptno; --dpt is the name of master block if x>0 then null; else insert into emp (empno, ename, sal, deptno) values (000,'Default',0,:dpt.deptno); end if; end; EXCEPTION when no_data_found then null END; |
![]() |
| Viewing: Dev Shed Forums > Databases > Oracle Development > problem while insert into |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|