|
Posted by J.O. Aho on 10/13/41 11:41
Marcin Podlesny wrote:
> Hi,
>
> First I must say that i'm a database (MSSQL) programmer (not php
> programmer) but I do a project with php part. This part is beeing done
> by programmers in other firm, so I'm completely rookie in php.
>
> The problem I have is a warning appearing when php executes one of my
> stored procedures. Warning message:
>
> "An output parameter variable was not provided"
>
> I've searched google but I found nohing interesting about this. I
> checked if procedures parameters declared in php are correct and they
> looks ok in my opinion.
>
> What can cause this warning?
It's not easy to say when not knowing how the code in this part of your script
looks like.
Looking at mssql_execute() user comments, there seems to be bit trouble with
the function.
http://se.php.net/manual/en/function.mssql-execute.php
--- user comment by SQL dot User ---
To receive output parameter from the procedure which returns one or several
recordsets, try this code:
....
mssql_bind($my_procedure, "@OutputParameter", SQLVARCHAR, true);
$result = mssql_execute($my_procedure);
while(mssql_next_recordset($result)) {
## do something
}
after listing last recordset output parameter will be available (strange...).
If you do not need output recordsets, just parameters, try this:
mssql_bind($my_procedure, "@OutputParameter", SQLVARCHAR, true);
$result = mssql_execute($my_procedure, true);
P.S. Tested on PHP 4.3.5.
--- eof ---
//Aho
Navigation:
[Reply to this message]
|