Video: 006 – Substitution Strings, Bind Variables, and APEX Links
“Substitution Strings, Bind Variables, and APEX Links” oh my.
Have you ever build an APEX link manually and perhaps it looked something like this:
We should talk.
I used to make this mistake and I’ve seen it made too many times. It’s time to address it head on.
In this video, I will show you why there may be a much better way and why you should be careful. Of course, there are other ways of building links dynamically, like using
APEX_UTIL.PREPARE_URL which could still be affected. Perhaps a better approach would be to use the “new” (in APEX 5.0)
In the video I comment on these links:
- Parsing … no big deal eh ? (You’ll want to read this one!
- Conditional column linking in APEX – Caution, the blog post used the &SESSION. approach, but Tony did realize this and noted it in the comments
TL;DR: Don’t concatenate variables or columns in your SQL
Don’t do this in SQL:
'f?p=' || :APP_ID || ':PAGE:' || :APP_SESSION || '::' || :DEBUG || ':'
You’ll avoid flooding your shared pool memory with unique SQL statements that cannot be re-used.