Macro for stored procedure

Hi to All,

In my db (Oracle) I have some packages, with procedures and functions.

Exists in SC a macro that execute a stored procedure/function and return the result in a variable?

for example in my DB I have this function:

FUNCTION get_hash (p_username IN VARCHAR2, p_password IN VARCHAR2)
   RETURN VARCHAR2
  AS
  BEGIN
   RETURN DBMS_OBFUSCATION_TOOLKIT.MD5 (
        input_string  =>  UPPER (p_username) || '/' || UPPER (p_password)
       );
  END;

How can call this function giving the return value to variable $var_password ?

Thank You and Best Regards
Gaetano

Re: Macro for stored procedure

You can try to use sc_lookup macro.

Re: Macro for stored procedure

I have tried this and I get a mysql or odbc error returned of:

1312: PROCEDURE mydatabasenamehere.myProcedurenamehere can't return a result set in the given context

ADOConnection._Execute(call myProcedurenamehere(paramvaluehere), false) % line 1010, file: adodb.inc.php
ADOConnection.Execute(call myProcedurenamehere(paramvaluehere)) % line 784, file: blank_app.php
blank_app_apl.controle() % line 1037, file: blank_app.php

The sql debug: (mysql): call myProcedurenamehere(paramvaluehere)

What version of ODBC is included or is Scriptcase using?

For a procedure to work it has to set the flag for CLIENT_MULTI_STATEMENTS … to which… I found this support/reason online:

"Make sure you are using the latest ODBC version; I believe the support for the CLIENT_MULTI_RESULTS flag was added in 3.51.12."

Any ideas? I would really like to use my Scriptcase connection object to call a stored procedure in a blank application? What is going on to make this work inside form or grid applications?

thanks,

David