APEX 5.1 – Interactive Grids – Controlling Allowed Operations

Johns Blog

In the last post I showed how easily you can enable an Interactive Grid for editing, however what if you want to only allow the user to edit certain rows?

Lets imagine a scenario – given the standard EMP table, I should only be able to change the salary of Employees who report to me (i.e. I can’t change the salary of an employee if they report to someone else).

So, let’s create an Interactive Grid with the following query –

Now, for the purposes of this example, given the hierarchy of the EMP table –

I’m going to “pretend” to be BLAKE – since BLAKE is the manager of 5 people.

If you look at the properties of the Interactive Grid you’ll see the “Allowed Row Operations Column” setting, this allows us to define a column in the query which will be used to define whether I can Update…

View original post 125 more words


Concurrency … the path to success and the path the failure

Learning is not a spectator sport

Let’s face it. Concurrency is a good thing when it comes to database applications. After all, if there is only a single user of your application, then chances are, it is not a successful application Smile. Of course there are exceptions to this rule, but by and large, most of the applications we build are going to be used by large populations of users. And given the recent publicity of users data and privacy, we can also be pretty confident that we want the data in our applications to be correct at all times.

As a developer, it is absolutely critical to keep concurrency in mind when building applications. Here is a simple demonstration to thrust home the point.

The task assigned to the developer here is simple – transfer move all of the rows satisfying a particular condition from table T1 to table T2. Let’s create our database objects…

View original post 1,144 more words

Cool stuff with partition elimination

Learning is not a spectator sport

Sometimes in the IT world, the term “surprise” is not a good one.

“I woke up this morning and got a …my database was down.”

“I ran a SELECT COUNT(*) on my most important table, and got a result of zero rows.”

and so forth. Generally as IT professionals, encountering the unexpected is not a good start to the day Smile.

But sometimes, surprises can be a nice thing.  Here is my example for today – when I found that the database can do a remarkably good job when it comes to reducing the workload with partitioned tables.  

Most people will already be familiar with the concept of partition elimination.  If you have a table partitioned into (say) yearly segments, and you ask for all of the data for the past 2 years, then the optimizer is intelligent enough to only scan the relevant partitions rather than the entire…

View original post 698 more words