Compile errors implementing calendar demo into my form.

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.


Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Mark GeerlingsDatabase AdministratorCommented:
Did you copy both the program unit (DATE_CHOOSEN) and the LOV (DATE_LOV) into your Form?  If so, it should compile without error.
RicottiAuthor Commented:

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.


Mark GeerlingsDatabase AdministratorCommented:
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.
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

RicottiAuthor Commented:
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.


RicottiAuthor Commented:
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?


RicottiAuthor Commented:
First sentence on last post is supposed to end with "compile errors" not "compilers". =)  


Mark GeerlingsDatabase AdministratorCommented:
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.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
RicottiAuthor Commented:
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!

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.