Coldfusion cfquery returns inserted oracle rowid

According to CF9 cfquery documentation , I should be able to return the oracle ROWID as a result of cfquery.

I failed in all counts, it just doesn't return any identifiers or generated keys

I am using oracle jdbc thin client, can someone point me in the right direction here?

+3
source share
1 answer

If you used one of the Oracle drivers that comes with ColdFusion, you must have access to the GENERATEDKEY from the RESULT structure in the ColdFusion request object. Since you are using the Oracle JDBC thin client driver, where you configure the data source using Add New Data Source> Other, then enter the JDBC configuration, you do not have access to the RESULT structure described in the documentation.

I encountered the same problem when we used the MS JDBC driver with CF8. After converting to CF9 with the built-in SQL driver, we were able to update our code to correctly refer to the RESULT structure.

You will need to write your INSERT statements to also select the ROWID value that you should get from the final object of the request.

+8
source

All Articles