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.