I am trying to set the version of SDE by using following code :
SET SERVEROUTPUT ON;
declare q varchar2(100);
ver varchar(10);
BEGIN
DBMS_OUTPUT.PUT_LINE('HI');
ver := 'PQ_358';
DBMS_OUTPUT.PUT_LINE(ver);
q := 'EXEC sde.version_util.set_current_version('''||ver||''')';
DBMS_OUTPUT.PUT_LINE(q);
EXECUTE IMMEDIATE q;
END;
It gives me output as :
HI
PQ_358
EXEC sde.version_util.set_current_version('PQ_358')
Error starting at line : 2 in command -
declare q varchar2(100);
ver varchar(10);
BEGIN
DBMS_OUTPUT.PUT_LINE('HI');
ver := 'PQ_358';
DBMS_OUTPUT.PUT_LINE(ver);
q := 'EXEC sde.version_util.set_current_version('''||ver||''')';
DBMS_OUTPUT.PUT_LINE(q);
EXECUTE IMMEDIATE q;
END;
Error report -
ORA-00900: invalid SQL statement
ORA-06512: at line 9
00900. 00000 - "invalid SQL statement"
*Cause:
*Action:
Any solution on this. Database: Oracle.
My objective is to run this code using C#.
Note: Cannot use StoredProcedure or function. Need to stick with c# code.