In my previous blog post I explained how to call a database procedure using only a few lines of Java code. I already hinted that it is possible to use custom types and tables, etc. Let's see an example of that in more detail.
A blog about Oracle ADF. This blog is no longer maintained because I left the ADF world for real HTML5 development using technologies like Web Components and frameworks like AngularJS, etc.
Wednesday, December 1, 2010
Wednesday, November 24, 2010
Calling an Oracle database procedure from Java with only ONE line of code
About a year ago I was working on an ADF application for one of our clients. One of the problems they faced was that they needed to call a lot of database procedures. It is not very hard to call a database procedure if you are familiar with the JDBC API, but somehow they were able to mess it up. And even if you do it right, you have to write quite a few lines of Java code for one database procedure call. How can we simplify this?
Wouldn't it be nice if you could copy the specification of a PL/SQL procedure or function and then... just call it? That is exactly how my DatabaseProcedure class works.
Wouldn't it be nice if you could copy the specification of a PL/SQL procedure or function and then... just call it? That is exactly how my DatabaseProcedure class works.
Subscribe to:
Posts (Atom)