L lacknerm Member Jun 26, 2000 #1 Is it possible to call a PL/SQL Function with a Result of CLOB, or is it better to call a Procedure with an out parameter. It would be helpfull if someone can provide a pice of code. thx Marc
Is it possible to call a PL/SQL Function with a Result of CLOB, or is it better to call a Procedure with an out parameter. It would be helpfull if someone can provide a pice of code. thx Marc
Marco Kalter Administrator Staff member Jun 27, 2000 #1 Yes, this is possible. Here is a code example. First the PL/SQL Block of a TOracleQuery: Code: begin :v_clob := my_clob_function(:some_param); end; Click to expand... Next, the Delphi code to call this PL/SQL Block and place the CLOB contents in a Memo: Code: var CLOB: TLOBLocator; begin CLOB := TLOBLocator.Create(MainSession, otCLOB); MyQuery.SetVariable('some_param', 100); MyQuery.SetComplexVariable('v_clob', CLOB); MyQuery.Execute; Memo.Lines.LoadFromStream(CLOB); CLOB.Free; end; Click to expand... This example assumes that you have defined a TOracleQuery instance (MyQuery) with appropriate variable types. ------------------ Marco Kalter Allround Automations
Yes, this is possible. Here is a code example. First the PL/SQL Block of a TOracleQuery: Code: begin :v_clob := my_clob_function(:some_param); end; Click to expand... Next, the Delphi code to call this PL/SQL Block and place the CLOB contents in a Memo: Code: var CLOB: TLOBLocator; begin CLOB := TLOBLocator.Create(MainSession, otCLOB); MyQuery.SetVariable('some_param', 100); MyQuery.SetComplexVariable('v_clob', CLOB); MyQuery.Execute; Memo.Lines.LoadFromStream(CLOB); CLOB.Free; end; Click to expand... This example assumes that you have defined a TOracleQuery instance (MyQuery) with appropriate variable types. ------------------ Marco Kalter Allround Automations