By Patch ~ May 29th, 2009. Filed under: Oracle, PL/SQL.
I am building a file upload package (or actually it has been built and I am expanding it). The file should be uploaded by a third party and when it’s done, then this code should kick off and upload the file to a clob for further processing.
The problem is that the third party can still be in the process of uploading the file while the package is trying to read it to upload it into a clob. How can you be sure the file is complete before you start reading it?
Continue reading »
| 3 Comments »
By Patch ~ May 6th, 2009. Filed under: Oracle, PL/SQL, Tools.
In a previous blog I talked about turning triggers on and off using semaphores. I created a semaphore for every table I needed along with its programs to set and unset the semaphore and to get its current state. This was a rather cumbersome process, because for every new trigger I needed to add these programs to the package. Both the spec and the body need to be recompiled which renders all dependant code to become invalid. This week I came across a similar problem with a new project. I figured I could use roughly the same solution but I needed to find a better way to implement it.
Continue reading »
| No Comments »
By Patch ~ March 18th, 2009. Filed under: Oracle, PL/SQL, Tools.
Alex wrote an entry on displaying images stored as a BLOB in the database here. Since PL/SQL Developer is my (and his) favorite editor, I figured I would do the same he did, but this time using PL/SQL Developer.
Continue reading »
| 2 Comments »
By Patch ~ March 4th, 2009. Filed under: Oracle, PL/SQL, Tools.
A while ago I created a plug-in for PL/SQL developer that allowed me to type in a short code, press a magic key and have the short code replaced by the contents of my template. For instance, I type put, press CTRL-J and the code I typed in gets replaced by dbms_output.put_line();. That’s a lot less keystrokes. Then problem with this plug-in was that it was not case sensitive. Typing put or PUT resulted in the same template being applied.
Continue reading »
| No Comments »
By Patch ~ February 17th, 2009. Filed under: Oracle, PL/SQL.
When you call a procedure or function in PL/SQL you basically have two options for the parameters. By name or by position. If you use the by name version, then every parameter is named. You don’t have to conform to the order of the parameters because Oracle will automatically put the value in the right variable. You can even mix both approaches, start with positional notation and then switch to named notation. Be aware though that you cannot switch back. Once you’re using named notation you cannot go back to positional notation.
Continue reading »
| 4 Comments »