Question

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

I've failed on all counts, it simply does not return any identity or generated keys

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

Was it helpful?

Solution

If you were using one of the Oracle drivers that ships with ColdFusion, then you should be able to access GENERATEDKEY from the RESULT struct within the ColdFusion query object. Since you are using the JDBC Oracle thin client driver, where you setup a data source using "Add a new data source > Other", then enter the JDBC configuration, you don't have access to the RESULT struct described in the documentation.

I ran into the same issue 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 reference the RESULT struct.

You will have to write your INSERT statements to also SELECT the value of ROWID, which you should be able to retrieve from the final query object.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top