This is an idea for an enhancement to the PL/SQL syntax.
If I have the following declaration:
I can do this:
INSERT INTO mytable VALUES in_record;
I can also do this:
UPDATE mytable SET ROW = in_record WHERE ...;
I can do this, as long as I list each and every column, in the right order:
INSERT INTO mytable VALUES in_record
RETURNING cola, colb, colc INTO out_record;
But I (more...)
Scott Wesley has started an excellent series of posts exploring the Early Adopter release of Apex 5.0.
I’m excited about the changes in 5.0 but have been too busy both at work and at home to look into it personally – so for now reading other people’s reviews has had to suffice. I’m looking forward to hopefully hearing more about it at AUSOUG later this year.
My advice is, have a look and (more...)
One of my clients reported an issue – they were seeing ”Waiting for 22.214.171.124″ and a blank screen when they tried to access the Apex web site I’d built for them. They were using Mozilla on a Windows PC, connecting via Vodaphone 3G – the problem was consistent, and it went away when they used their ADSL connection.
My initial response was “don’t use Vodaphone 3G” because the problem seemed to be outside of (more...)
Instead of calling a function, when you can get the same effect by accessing a documented PL/SQL variable, you should. For example:
v('APP_USER') = APEX_APPLICATION.g_user
v('REQUEST') = APEX_APPLICATION.g_request
v('APP_ID') = APEX_APPLICATION.g_flow_id
v('APP_PAGE_ID') = APEX_APPLICATION.g_flow_step_id
v('DEBUG') = APEX_APPLICATION.g_debug
g_debug is a boolean, unlike the
There’s more here: documentation for the APEX_APPLICATION package
I suspect that the implementation of
v() is something like this:
FUNCTION v (p_name IN (more...)
I decided to try using a wrapper procedure to isolate calls to APEX_UTIL.set_session_state in an autonomous transaction. I’m currently using it in a project and seeing how it goes in terms of performance.
DISCLAIMER: Don’t just throw this into your mission-critical system without at least testing it thoroughly first.
Since I had Morten Braten’s Alexandria library handy, I simply modified his APEX_UTIL_PKG. If you’re not using this library you can create your own wrapper (more...)
When should you commit or rollback a transaction? As late as possible, I would have thought, based on most of the advice in the Oracle world. You certainly want this to be predictable and consistent, at least.
Unfortunately, if you use
APEX_UTIL.set_session_state in your PL/SQL process, the result is not so predictable.
Thanks to Martin D’Souza who alerted me to this. I love learning new things, but occasionally you get a bad surprise like (more...)
I recently saw this approach used in a complex Apex application built for my current client, and I liked what I saw – so I used a similar one in another project of mine, with good results.
- Pages load and process faster
- Less PL/SQL compilation at runtime
- Code is more maintainable and reusable
- Database object dependency analysis is much more reliable
- Apex application export files are smaller – faster to deploy
- Apex pages can be (more...)
Get it? “an item with many hats”… yeah ok.
Need to change the label of an item on-the-fly? When I run my Apex page it renders item labels like this:
If the label needs to change based on another item, I could set the label with the value of another item, e.g. “&P1_CONTACT_NUMBER_LABEL.” and when the page is refreshed it would pick up the new label. But at (more...)
My current client has a large number of Apex applications, one of which is a doozy. It is a mission-critical and complex application in Apex 4.0.2 used throughout the business, with an impressively long list of features, with an equally impressively long list of enhancement requests in the queue.
They always have a number of projects on the go with it, and they wanted us to develop two major revisions to it in (more...)
An enhancement request I was assigned was worded thus:
“User will optionally enter the Phone number (IF the phone was blank the system will default the store’s area code).”
I interpret this to mean that the Customer Phone number (land line) field should remain optional, but if entered, it should check if the local area code had been entered, and if not, default it according to the local store’s area code. We can assume (more...)