This topic is locked

Question using the result from a stored Procedure

4/22/2008 4:28:16 AM
PHPRunner General questions
rjks author

Hello Support,
I have the following Problem.
I must use the result of a stored Procedure.
I have set up a db with the required structure and can generate the basic code. So far so good, now to the Problem.
Where must I replace the Standard results in PHPR with the returned result from the stored procedure to be able to display it on the list page. Up till now I either get an SQL error or nothing is displayed.
Can I call the Procedure in an event and return the result so that it will be used instead of the standard results from PHPR, for example here from the _list.php code?
[codebox]if(CheckSecurity(@$SESSION["".$strTableName."_OwnerID"],"Search"))

{

$strSQLbak = $strSQL;

if(function_exists("BeforeQueryList"))

BeforeQueryList($strSQL,$strWhereClause,$strOrderBy);

// Rebuild SQL if needed

$strSQL =("EXEC[sp_iDeb_All_OP] 'All', 'ALL', 'ALL' ");

if($strSQL!=$strSQLbak)

{

// changed $strSQL - old style

$numrows=GetRowCount($strSQL);

}[/codebox]

rjks author 4/23/2008

Hello Support,
as no Answer is forthcoming I have tried a few things.
I only tested this on the list, I searched for the place where the List Results were displayed and replaced them with my MSSQL Result, the data was displayed and little by litte by replacing the origional SQL string with my EXEC call of the procedure most of the functions worked.
I would really like to see remote procedures for MSSQL supported with this great product, it will be another great step towards perfection.
Any Ideas how I can use the search definitions with my result array??
Robert