freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "Cadman, Andrew (Contractor)" <Andrew_Cadman AT eu.odedodea.edu>
- To: "'freetds AT lists.ibiblio.org'" <freetds AT lists.ibiblio.org>
- Subject: [freetds] problem with return values
- Date: Tue, 13 Jan 2004 19:43:06 +0100
Hi
I have a strange problem with OUTPUT parameters using FreeTDS 0.62 with PHP
4.3.2, running Redhat 9, connected to SQL Server 2000.
I can return result sets without any issue at all, but in some cases where a
return value is set -1, it is returned as 0. This happens on a number of
different stored procedures.
However, running the stored procedure directly through SQL SERVER Enterprise
Manager's Query Analuzer utility works just fine and returns the correct
value. A sample of the PHP code is shown below:
$db = new sql_db($dbHost, $dbUser, $dbPasswd, $dbName, false);
$query = $db->sql_sproc_init("dbo.proc_login_registrar");
$param_len_1 = strlen($username);
$param_len_2 = strlen($password);
$db->sql_sproc_bind("@puserid",$username,SQLCHAR,false,false,$param_len_1);
$db->sql_sproc_bind("@ppassword",$password,SQLCHAR,false,false,$param_len_2)
;
$db->sql_sproc_bind("@pRetVal",&$pRetVal,SQLINT2,true,false,1);
$db->sql_sproc_bind("RETVAL",&$pRetValAgain,SQLINT2,true,false,2);
$rw = $db->sql_sproc_exec();
Anyone have any ideas?
thanks in advance,
Andrew Cadman
-
[freetds] problem with return values,
Cadman, Andrew (Contractor), 01/13/2004
- <Possible follow-up(s)>
- RE: [freetds] problem with return values, Rogers, Tom, 01/13/2004
Archive powered by MHonArc 2.6.24.