Oracle Forms

Oracle for MS SQL and MySQL people

Getting started

My workplace uses Forms 4.5 (Developer 2000) currently. When we migrate to Forms 6, I'll add Forms 6 tips.

If you haven't used the Forms development tools before, they really don't make it easy. I found that creating all my tables, constraints (keys, etc) then working through the provided documentation 'Forms Getting Started' was the only way to get my head around it. The provided documentation really isn't good, but you've got to start somewhere. In the Developer 2000 version, start at Chapter 4, where you create a new form.

If you've created your tables and all your primary and foreign keys and any other check or unique constraints, you can get Oracle to do some of the work for you. When you open Forms Designer, you automatically have a new form. Click on 'Blocks' and then select 'Create' from the Navigator menu. If yuo enable Integrity Constraints, Oracle will pick up on your table constraints and build them into the form.

Automatically inserting new auto ids is a bit tricky. It's probably best to use a pre-insert trigger that gets the next sequence number and uses it for the id for the new row. There are five kinds of triggers: ON, WHEN, PRE, POST, and KEY. Some kinds are deprecated in later versions.

You can make your application nicer for your users by creating a 'new-form-instance' trigger to populate the form with all records from the database when the user opens the application.

If you need to disable a trigger to debug while developing a form, change the '-' in the trigger name to '_'. This is much like commenting out the body of a function in normal programming languages.

These websites may help: