[freetds] error when execute stored procedures.

Robert Gonzalez robert at robert-gonzalez.com
Tue Mar 16 20:40:57 EDT 2010


I know this is old. Sorry if it has been handled already...

Are you using PHP? If so, try not issuing the EXEC command and instead call
the proc as dbname.dbowner.procname @param1='val'. Not sure that it matters,
but I have always done that against both Sybase and SQL Server from PHP
without issue.

The only time I send the exec is when I am calling more than one proc in the
same request, but even then I reference the same call pattern.

<?php
$sql  = "exec mydb..myproc @dt='03/20/10', @usr=2";
$sql .= "exec mydb..myotherproc @room=12";

// ... snip ...
?>

On Thu, Feb 25, 2010 at 7:18 AM, Zandy Bierhoff <zandybierhoff at gmail.com>wrote:

> Hi! people
> When you run a procedure with parameters the server gets sick .. ex:
>
> $ a = mssql_query ( "EXEC sp_some 'a', 'b'");
>
> Now if I run the following procedure without parameters
>
> $ a = mssql_query ( "exec sp_configure");
>
> does not give any error ...
>
> the first procedure the probe in queryAnalizer and works perfect .....
>
> any suggestions
> greetings
> _______________________________________________
> FreeTDS mailing list
> FreeTDS at lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
>



-- 
Robert Gonzalez
http://www.robert-gonzalez.com
http://twitter.com/RobertGonzalez
http://www.linkedin.com/in/robertanthonygonzalez



More information about the FreeTDS mailing list