AnsweredAssumed Answered

sql with cx_Oracle

Question asked by fallingdog on May 2, 2018

This sql works fine from pl/sql developer but fails when I try and do it with cx_Oracle.

 

Working fine....

call sde.version_util.set_current_version ('ARCFM8.vtest');
call sde.version_user_ddl.edit_version ('ARCFM8.vtest', 1);
update arcfm8.table_vw set REFERENCEDRAWING = 'my multiversion view update!!'
where OBJECTID = 3;
commit;
call sde.version_user_ddl.edit_version ('ARCFM8.vtest', 2);

 

Failing on line 3...

with cx_Oracle.connect("arcfm8/xxxx@xxxx") as connection:
    cursor = connection.cursor()
    cursor.callproc("sde.version_util.set_current_version", ('ARCFM8.vtest'))
    cursor.callproc("sde.version_user_ddl.edit_version", ('ARCFM8.vtest', 1))
    cursor.execute(
        "update arcfm8.table_vw set REFERENCEDRAWING = 'my SECOND multiversion view update!!!' where OBJECTID = 3")
    cursor.callproc("sde.version_user_ddl.edit_version", ('ARCFM8.vtest', 2))

cx_Oracle.DatabaseError: ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'SET_CURRENT_VERSION'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored

Outcomes