Examples of exchanging parameters with Stored Procedure in DB Lookup Table

Homepage Clovertech Forums Cloverleaf Examples of exchanging parameters with Stored Procedure in DB Lookup Table

  • Creator
    Topic
  • #121516
    Jim Kosloskey
    Participant

    Cloverleaf 19.1, CentOS.

    I am considering the use of Stored Procedures for Lookup Tables and want to exchange parameters in the call. Is anyone willing to share their insight into how they accomplished this and any caveats of which to be aware?

    email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

Viewing 1 reply thread
  • Author
    Replies
    • #121517
      Jim Vilbrandt
      Participant

      Hi Jim,

      I am running inbound stored procedures with both Oracle and MSSQL. The process is very different for both. I am not passing parameters to the called procedure, so I am curious if someone has accomplished this.

      Oracle:
      CREATE OR REPLACE PROCEDURE cp_clv_test(out_var out sys_refcursor)
      IS
      BEGIN
      open out_var for select <values> from <tablename> where <qualification>;
      END;

      Read Action: {call cp_clv_test(rowset OUT CURSOR)}

      MSSQL:

      CREATE PROCEDURE cp_clv_test
      AS
      BEGIN
      SET NOCOUNT ON;
      select <values> from <tablename> where <qualification>;
      RETURN;
      END;

      Read Action: {call cp_clv_test()}

      You can update the row sent in this way:

      Read Success Action: UPDATE <tablename> SET <fieldname>=<value> WHERE <fieldname>=<<passedvalue>>

      Note: passedvalue must be a field returned by the stored procedure and must be enclosed in <>.

      I hope that helps!

      Are you aware that CentOS reached “end of life” on 30.06.2024???

      Best Regards from Germany, Jim Vilbrandt

    • #121519
      Jim Kosloskey
      Participant

      Jim,

      Thanks for the input. In my case someone else decides the O/S and while the information you provided is very helpful, I wonder if the Table Lookup for a DB via Stored Procedure configuration is different.

      I very specifically want to exchange parameters with the invoked Stored Procedure so I hope (as you do) that someone who has done this will chip in.

      For example, I wonder how the Xlate gets the value of an Output Parameter(s).

       

      email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

Viewing 1 reply thread
  • You must be logged in to reply to this topic.

Forum Statistics

Registered Users
5,115
Forums
28
Topics
9,290
Replies
34,422
Topic Tags
286
Empty Topic Tags
10