How to set the SQL for TOraStoredProc where SQL is multiline plsql call block
Dear Forum
Can anyone tell me how to the set the SQL for TOraStoredProc
I was able to set the value for StoredProcName relatively easily .. but I am not sure how to approach the SQL
I can get the value of the SQL from the properties, but not sure how to set it.
Can anyone offer advice?
Many thanks
Regards
Adrian
Using this I can see values
writeLn(OraStoredProc_SetRole.StoredProcName);
writeLn(OraStoredProc_SetRole.SQL.Text);
I want to set the SQL to something like the following programmatically
begin
SECAPPADMIN.TOPORAIL_VARI_PRIVS_PKG.SET_ROLE(:P_KEY, :P_PERMISSION);
end;
or
declare
v_IN_FOR_CHANGE boolean := sys.DIUTIL.INT_TO_BOOL(:IN_FOR_CHANGE);
v_IN_GANZE_CH boolean := sys.DIUTIL.INT_TO_BOOL(:IN_GANZE_CH);
v_OUT_STATUS boolean;
begin
geomatik.gss_EXPORT_PCK.EXPORT_GSS(:IN_GSS_KEY, :IN_USERID, :IN_SPRACHE, v_IN_FOR_CHANGE, v_IN_GANZE_CH, :IN_Y_ECKE1, :IN_X_ECKE1, :IN_Y_ECKE2, :IN_X_ECKE2, v_OUT_STATUS, :OUT_FEEDBACK);
:OUT_STATUS := sys.DIUTIL.BOOL_TO_INT(v_OUT_STATUS);
end;
How to set the SQL for TOraStoredProc where SQL is multiline plsql call block
Re: How to set the SQL for TOraStoredProc where SQL is multiline plsql call block
Found the solution - See https://www.devart.com/odac/docs/pl_sql_torasql.htm
Not the neatest of code but should work for my purposes
Regards
Not the neatest of code but should work for my purposes
Regards
Re: How to set the SQL for TOraStoredProc where SQL is multiline plsql call block
Yes, to execute SQL statements with multiline plsql call block, you can use TOraSQL Class. TOraStoredProc is a component for working with a specific stored procedure in Oracle, which name you can set in the property OraStoredProc.StoredProcName.