Home » Developer & Programmer » Forms » compilation error
compilation error [message #415761] Wed, 29 July 2009 03:26 Go to next message
simcky
Messages: 38
Registered: July 2009
Member
hi
i m making a form in which i m having two blocks based on the same table
in first block i m having empno,earningdeduction,item1,item2 fields
and i had set the database property to no for all these items
now in my second block i m also having some items and i had created a master detail relation using the query
prmamed.empno=prmamed1.empno and prmamed.earningdeduction=prmamed1.earningdeduction
now when i m running this form then i m getting this compilation error:-
FRM-30407: Block must have at least one database item.
Block: PRMAMED
FRM-30113: Block must have non-query-only database item.
Block: PRMAMED

Created form file MODULE1.fmx
but my fmx is coming and it's working properly the way i need my form to run but i have to remove this compilation error could someone of u please help me out .
Re: compilation error [message #415766 is a reply to message #415761] Wed, 29 July 2009 04:10 Go to previous messageGo to next message
Littlefoot
Messages: 20900
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Block 'prmamed' has been created as a database data block (check its property palette). In that case, at least one item must be a database item. Otherwise, as you've chosen to make it a control block, set its "database data block" property to "No".
Re: compilation error [message #415767 is a reply to message #415766] Wed, 29 July 2009 04:19 Go to previous messageGo to next message
simcky
Messages: 38
Registered: July 2009
Member
Hello Mr.Littlefoot
thanks for the reply sir but if i m setting the database data block property to no then i m getting this compilation error:
FRM-30416: Relation's master block is a control block.
Relation: PRMAMED_PRMAMED1
Block: PRMAMED
Form: MODULE1
FRM-30085: Unable to adjust form for output.
Re: compilation error [message #415769 is a reply to message #415761] Wed, 29 July 2009 04:24 Go to previous messageGo to next message
cookiemonster
Messages: 12415
Registered: September 2008
Location: Rainy Manchester
Senior Member
So get rid of the relationship between the blocks.
Re: compilation error [message #415773 is a reply to message #415769] Wed, 29 July 2009 04:36 Go to previous messageGo to next message
simcky
Messages: 38
Registered: July 2009
Member
Hello Mr.cookiemonster
sir if i m deleting the relationship then i m getting the same compilation error and also the database error as:
FRM-40508 ORACLE ERROR:unable to insert record
Re: compilation error [message #415775 is a reply to message #415761] Wed, 29 July 2009 04:41 Go to previous messageGo to next message
cookiemonster
Messages: 12415
Registered: September 2008
Location: Rainy Manchester
Senior Member
Same as which compilation error? You've posted two.
Copy and paste the error.

and how exactly can you get any run time error from a form that you can't compile?

EDIT: typos

[Updated on: Wed, 29 July 2009 04:42]

Report message to a moderator

Re: compilation error [message #415779 is a reply to message #415775] Wed, 29 July 2009 04:53 Go to previous messageGo to next message
simcky
Messages: 38
Registered: July 2009
Member
yes sir you r right but after getting the compilation error i m getting the executable form also me myself is confused but it happing please see the attachment and i m also sending the fmx attachment also
  • Attachment: form1.GIF
    (Size: 47.10KB, Downloaded 292 times)
Re: compilation error [message #415780 is a reply to message #415775] Wed, 29 July 2009 04:55 Go to previous messageGo to next message
simcky
Messages: 38
Registered: July 2009
Member
my fmx attachment
  • Attachment: form2.GIF
    (Size: 48.22KB, Downloaded 312 times)
Re: compilation error [message #415783 is a reply to message #415761] Wed, 29 July 2009 05:05 Go to previous messageGo to next message
cookiemonster
Messages: 12415
Registered: September 2008
Location: Rainy Manchester
Senior Member
There is no point trying to run a form untill you've fixed the compilation errors. I assume you're actually running one created previously.
What's the Database Data Block property of the PRMAMED block currently set to?

And next time copy and paste the error messages - screen shots are really hard to read.
Re: compilation error [message #415784 is a reply to message #415783] Wed, 29 July 2009 05:15 Go to previous messageGo to next message
simcky
Messages: 38
Registered: July 2009
Member
Database Data Block property of the PRMAMED block currently set to yes right now and sir i had just made this form i m not running the previous one
Re: compilation error [message #415786 is a reply to message #415766] Wed, 29 July 2009 05:22 Go to previous messageGo to next message
cookiemonster
Messages: 12415
Registered: September 2008
Location: Rainy Manchester
Senior Member
Littlefoot wrote on Wed, 29 July 2009 10:10
Block 'prmamed' has been created as a database data block (check its property palette). In that case, at least one item must be a database item. Otherwise, as you've chosen to make it a control block, set its "database data block" property to "No".

Re: compilation error [message #415790 is a reply to message #415786] Wed, 29 July 2009 05:50 Go to previous messageGo to next message
simcky
Messages: 38
Registered: July 2009
Member
sir but if i m setting the database data block property to no then i m getting this compilation error:
FRM-30416: Relation's master block is a control block.
Relation: PRMAMED_PRMAMED1
Block: PRMAMED
Form: MODULE1
FRM-30085: Unable to adjust form for output.

and if i m deleting the relation also and setting the database data block property as no then i don't get the compilation error but again the FRM-40508:ORACLE ERROR and when i press f1+shift then i got the database error
sql statement in error:
INSERT INTO PRMAMED(EMPNO,EARNINGDEDUCTION,PAYPERIOD,REFNO,REFDATE,AMT,PAYCALPERIOD) VALUES (:1,:2,:3,:4,:5,:6,:7)
error:
ORA-01400: cannot insert NULL into ("PRIME"."PRMAMED"."EMPNO")
Re: compilation error [message #415791 is a reply to message #415786] Wed, 29 July 2009 05:51 Go to previous messageGo to next message
Littlefoot
Messages: 20900
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
It seems that all those problems would be gone, only if you remove one of the blocks. You've said that both of them are based on the same table (if so, how come that one of them contains only non-database items?) - why did you do that? What's wrong with one block? What problem are you trying to solve?

If you insist on master-detail design, then make both blocks database blocks, as well as items they contain database items.
Re: compilation error [message #415793 is a reply to message #415791] Wed, 29 July 2009 05:59 Go to previous messageGo to next message
simcky
Messages: 38
Registered: July 2009
Member
actually i making this form to save data to the database and this should be done employee and earningdeduction wise so i m taking both of these items in my first block and to populate these item's i had made lov's now based on these two item's i have to fill all other detail of the employee so i m taking all other item's in the second block and at a tme the end user can enter 10 records for the same employee so i m having 10 records in my second block .
so how can i remove one of the block sir
Re: compilation error [message #415796 is a reply to message #415791] Wed, 29 July 2009 06:07 Go to previous messageGo to next message
cookiemonster
Messages: 12415
Registered: September 2008
Location: Rainy Manchester
Senior Member
Littlefoot wrote on Wed, 29 July 2009 11:51
It seems that all those problems would be gone, only if you remove one of the blocks. You've said that both of them are based on the same table (if so, how come that one of them contains only non-database items?) - why did you do that? What's wrong with one block? What problem are you trying to solve?



this one: save trigger not working

@smicky - since this is directly related to the other thread it would have simpler if you'd just continued that one.

Try setting Copy Value From Item property of the detail blocks empno item to be PRMAMED.empno.

The relationship was doing that for you but since you've had to remove it you're going to have to do it manually.
Re: compilation error [message #415797 is a reply to message #415793] Wed, 29 July 2009 06:09 Go to previous messageGo to next message
Littlefoot
Messages: 20900
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
You'd remove it by pointing to it in Object Navigator and pressing <Delete> key (or red 'x' in the toolbar).

If I understood what you are saying, you would like to enter several records, and all of them share certain information (such as "employee ID", and "earning deduction"). So enter them in the first record only, and copy into every new record you create. Check use of the DUPLICATE_RECORD built-in. (You'd then make other items empty by setting them to NULL).
Re: compilation error [message #415798 is a reply to message #415791] Wed, 29 July 2009 06:10 Go to previous messageGo to next message
simcky
Messages: 38
Registered: July 2009
Member
sir,
could you suggest me to build this form in different way is there any other way i could solve my problem i m getting mad i don't know what to do please help me out..
Re: compilation error [message #415799 is a reply to message #415796] Wed, 29 July 2009 06:12 Go to previous messageGo to next message
cookiemonster
Messages: 12415
Registered: September 2008
Location: Rainy Manchester
Senior Member
cookiemonster wrote on Wed, 29 July 2009 12:07

Try setting Copy Value From Item property of the detail blocks empno item to be PRMAMED.empno.

The relationship was doing that for you but since you've had to remove it you're going to have to do it manually.

Re: compilation error [message #415976 is a reply to message #415799] Thu, 30 July 2009 00:42 Go to previous message
simcky
Messages: 38
Registered: July 2009
Member
hello Mr.CookieMonster

As u said "Try setting Copy Value From Item property of the detail blocks empno item to be PRMAMED.empno"
This trick is working for me my form is now running without any compilation and without any database error
Thanks a lot sir Smile

[Updated on: Thu, 30 July 2009 00:43]

Report message to a moderator

Previous Topic: Reading data from Serial Port.
Next Topic: how to delete record
Goto Forum:
  


Current Time: Wed Dec 07 22:09:30 CST 2016

Total time taken to generate the page: 0.10528 seconds