Solved

Compile errors implementing calendar demo into my form.

Posted on 2004-08-20
8
1,195 Views
Last Modified: 2012-06-21
I am trying to implement the oracle calendar demo into my form but I receive the following errors for Program Units "DATE_CHOOSEN* (Procedure Body),

Error 201 at line 3, column 17
 identifier 'DATE_LOVE.CURRENT_LOV_DATE' must be declared
Error 0 at line 3, column 4
 Statement ignored
Error 201 at line 4, column 12
 identifier 'DATE_LOV.DATE_LOV_RETURN_ITEM' must be declared
Error 0 at line 4, column 4
 Statement ignored
Error 201 at line 5, column 7
 identifier 'DATE_LOV.LOV_AUTO_SKIP' must be declared
Error 0 at line 5, column 4
 Statement ignored

I have followed all oracle help documentation and related posts about implementing the calendar form but I'm stuck on these compile errors. I know I have got to be missing something simple. Please point me towards the light.

Thanks.

Ricotti
0
Comment
Question by:Ricotti
  • 5
  • 3
8 Comments
 
LVL 34

Expert Comment

by:Mark Geerlings
Comment Utility
Did you copy both the program unit (DATE_CHOOSEN) and the LOV (DATE_LOV) into your Form?  If so, it should compile without error.
0
 

Author Comment

by:Ricotti
Comment Utility
Markgeer,

Here is some more detailed steps on what I have done,

1. Create a new MODULE in Forms Builder (well, I used a copy of my form I am trying to add calendar to)

2. Then open the stndrd20.olb file (this .olb file is located    in the ORACLE_HOME/TOOLS/DEVDEMXX/Forms FOLDER)

3. You will see 'STANDARDS' appear under 'Object Libraries' in the Object     Navigator

4. Double click on the book-like icon next to 'STANDARDS'

5. Expand the object library window that appears

6. Click on the 'COMPONENTS' tab

7. Look for the 'CALENDAR' object library  

8. Drag-n-drop the 'CALENDAR' object into your new form (I subclassed it)

9. Notice all the new items are now in your form marked with a red arrow*    *The red arrow means that the items are subclassed.

10. Attach the PL/SQL library CALENDAR.PLL    (this .pll file is also located in the ORACLE_HOME/TOOLS/DEVDEMXX/Forms     FOLDER) ( I went to file, open, and opened calendar.pll file. I then clicked on Attached Libraries under the Calendar PL/SQL Libraries section and went to browse and selected calendar.pll file and left File System radio button filled in. When I click attached it asks if I want to remove the path, and I click YES)

11. In Forms, Create a new block on a new canvas (well, I used a copy of my form I am trying to add the calendar to)

12. Create a Key-Listval trigger on the date item for which you  would like to use the Date LOV Window. Add the below code to display the calendar using the Date_LOV package.  ( I created a date item in my form datablock where I want to use the calendar. I then created a trigger under this item for Key-Listval and pasted the code below into the trigger.)

date_lov.get_date(sysdate,         -- initial date                
'emp.hiredate',  -- return block.item                  
240,             -- window x position                  
60,              -- window y position                  
'Start Date',    -- window title                  
'OK',            -- ok button label                  
'Cancel',        -- cancel button label                  
TRUE,            -- highlight weekend days                  
FALSE,           -- autoconfirm selection                  
FALSE);          -- autoskip after selection

The calendar program unit and Lovs are in my form after doing the above steps.

I hope this information helps more on solving this problem. I have gone through these steps from scratch many times and I end up stuck at these compile errors everytime. I can't get past this point, I am missing something.

Thanks,

Ricotti
0
 
LVL 34

Expert Comment

by:Mark Geerlings
Comment Utility
That looks correct.  I didn't test all of those steps now, but we had done about the same thing here some time ago when we started building our custom Forms application in Forms6.  We still have some Forms that have this program unit and LOV in them and they compile fine when we make other small changes.

For a test, you could try copying rather than sub-classing the objects and see if the Form compiles that way.  The error messages make it look like the Forms compiler does not see the DATE_LOV as being in the Form.
0
 

Author Comment

by:Ricotti
Comment Utility
Also to add on this, I get the same compile errors when trying to compile the calendar.fmb.

I will try the copy instead of subclass though real quick and post results asap.

The DATE_LOV is not actually supposed to appear under the LOVs section on the Object Navigator is it?  On the calendar.fmb and my own form the DATE_LOV is under Program Units under Calendar in the P:/SQL Libraries section of the Object Navigator.

Hope this helps.

Thanks,

Mike
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Author Comment

by:Ricotti
Comment Utility
I started from scratch again and tryed the copy instead of the subclass and still results with same compilers. Its like you said Markgeer, it is acting like it cannot see DATE_LOV. Hmm.. And its odd too that my calendar.fmb from oracle (not messed with at all) has same errors when compiled. Do I have some bad files maybe?

Thanks,

Ricotti
0
 

Author Comment

by:Ricotti
Comment Utility
First sentence on last post is supposed to end with "compile errors" not "compilers". =)  

Thanks,

Ricotti
0
 
LVL 34

Accepted Solution

by:
Mark Geerlings earned 350 total points
Comment Utility
You are correct on DATE_LOV.  I just checked one of our Forms that uses it.  That is a package in the calendar.pll file, it is not an LOV that needs to be copied or sub-classed in to the Form.
So, either your calendar.pll file is bad, or for some reason the Forms compiler does not see the contents of that pll file as being available when it tries to compile the Form.
Is that pll file in the same directory as your *.fmb?  Or, is it in a directory that is included in your FORMSxx_PATH variable?  We just put all of our *.fmb, *.pll and *.mmb files in one directory, and set that as the working directory for Forms Designer.  That way we don't have to worry about the Formsxx_path value, and our forms always compile without complaining about pll library problems.
0
 

Author Comment

by:Ricotti
Comment Utility
Markgeer! I put the calendar.fmb, calendar.pll, and stndrd20.olb in its own directory and I am now successfully able to compile the form!! These files were located in the same directory before but along with many other oracle forms and objects etc from default. So there must of been some conflict with another file. =)

Thanks your good tips Markgeer!

Ricotti
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now