Skip to main content
Participant
March 6, 2012
Question

CF9 and Oracle ROWID issue

  • March 6, 2012
  • 1 reply
  • 1194 views

Hi All,

  I have an issue when regarding cfquery and ROWID.

  When I insert a value into Oracle database, with CF8, I receive the  ROWID in result variable but not in CF9.

  I don't use the Oracle Driver provide by CF due to a special connectivity URL.

  I use the OJDBC14.jar file provided by Oracle.

  Please find below some configuration informations and sample.

   

Thanks in advance

Best Regards

Stephane

DATASOURCE :

CF Data Source : MyDataSource

JDBC URL : jdbc:oracle:thin:@(DESCRIPTION =

            (ADDRESS_LIST =

              (ADDRESS = (PROTOCOL = TCP)(HOST = IP1)(PORT = 1521))

              (ADDRESS = (PROTOCOL = TCP)(HOST = IP2)(PORT = 1521))

            )

            (CONNECT_DATA =

             (SERVICE_NAME = MyService)

            )

          )

Driver Class : oracle.jdbc.OracleDriver

Driver : Other

SAMPLE :

    <cfquery name="test1" datasource="MyDataSource" result="res">

        insert into testtable    (ID, NAME) VALUES (9026,'testest')

    </cfquery>

    <cfdump var="#res.rowid#">

This topic has been closed for replies.

1 reply

Owainnorth
Inspiring
March 6, 2012

To be honest there are so many intricacies like this with various drivers that I never rely on it. I tend to do one select to get the ID, then include that in the insert. Guaranteed to work that way.