php - Not getting result from MsSQL Stored Procedure -


here stored procedure, trying call using pdo , tried using mssql_init in php. able query stored procedure. getting result nothing.

stored procedure---------------------------------

declare @rc int declare @pxmlrequest xml declare @ptestproduction varchar(10) declare @poxmlresponse xml  set @pxmlrequest = '<some><xml here /></some>'  execute @rc = [dbo].[myspname] @pxmlrequest, @ptestproduction, @poxmlresponse output  select @poxmlresponse go 

code in php pdo ---------------------------------

$stmt = $dbh->prepare("exec myspname @pxmlrequest=?,  @ptestproduction=?, @poxmlresponse=?"); $stmt->bindparam(1, $xml, pdo::param_str, 2000); $stmt->bindparam(2, 'testing', pdo::param_str, 20); $stmt->bindparam(3, $out, pdo::param_str|pdo::param_input_output, 20000); $stmt->execute(); // still empty $out 

code in mssql_init() ----------------------------------

$sp_name = 'myspname'; $proc = mssql_init($sp_name); $sp_parms->pxmlrequest = $xml; $sp_parms->ptestproduction = $testing;  $poxmlresponse = 0; foreach ($sp_parms $key=>$parm) {     mssql_bind($proc, '@'.$key, $sp_parms->$key, sqltext, false, false); } mssql_bind($proc, '@poxmlresponse', $poxmlresponse, sqlvarchar, true,   false, 10000); $result=mssql_execute($proc); mssql_next_result($result); // receiving output  // implicit conversion data type xml varchar not allowed. use convert function run query. // no access server side cannot perform stored procedure alteration. 


Comments

Popular posts from this blog

python - Selenium remoteWebDriver (& SauceLabs) Firefox moseMoveTo action exception -

html - How to custom Bootstrap grid height? -

transpose - Maple isnt executing function but prints function term -