ROWID with Oracle thin clinet datasource

In one of my CF project I was using my datasource with JDBC driver from CF admin. But recently, I have upgrade my webserver to Weblogic 12c as well as I have start using my all datasource with Oracle thin client driver from Weblogic Console. Most everything is working, however, there was one section of legancy code where I got error.

This error is related to a column named ‘ROWID’ which is a built in ‘column’ in Oracle that returns a unique value for each row in a database. Its king of like a UUID. When I did a <cfdump> of the query, I noticed that the value of the ROWID column was not a string, but a Java object of type ‘oracle.sql.ROWID’.

Here is a snapshots of <cfdump> of my query:

Recent, I was using my datasource with JDBC driver from CF admin and that time I noticed that the value of the ROWID was string. Here is a snapshot of the <cfdump>:

As off now to overcome this issue, In my query I have just used in built function of Orcale ‘rowidtochar()’ which converts the rowid value to string value and I got the string value in my query object. But still I think that this is not a proper solution because I need to do this change every where I’ve used ‘ROWID’ in my project. There may be some settings with Oracle thin client driver that I need to do. Anyone have any idea about this please share……

All in all, a lot of time was not wasted on this issue, but it does bring an important point to light. When you are dealing with any upgrade or going to use any different environment, you need to be aware of how those different environments might behave – such as what is returned from a query.

How to pause execution of javascript for sometime

Today, I was just looking into the ways to pause or wait or delay execution of my javascript statement for some given time. I do some google for this and I got such a really good code snippet – sleep() function from somewhere.

sleep() Function in Javascript

function sleep(milliseconds) { 
        var start = new Date().getTime(); 
        for (var i = 0; i < 1e7; i++) { 
                if ((new Date().getTime() - start) > milliseconds){ break; } 


//Sleep for 1 second (1000 milliseconds). 
console.log(new Date()); 
console.log(new Date());