Skip to Content.
Sympa Menu

freetds - Re: [freetds] Output parameters

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "ZIGLIO, Frediano, VF-IT" <Frediano.Ziglio AT vodafone.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Output parameters
  • Date: Wed, 23 Apr 2008 16:37:45 +0200

>
> Hi,
>
> I'm having a problem getting my output parameters returned in PHP from
> an sql server stored procedure. This is the code used, it is fairly
> straightforward:
>
> $canLogin = 666;
> $websiteID = 2;
>
> $sp = mssql_init('sp_web_WebsiteEnabled');
> mssql_bind($sp, '@WebsiteID', $websiteID, SQLINT4, false); // INT
> mssql_bind($sp, '@Enabled', $canLogin, SQLINT1, true); // TINYINT
> (OUTPUT)
> mssql_execute($sp);
>
> // $canLogin is still 666
>
>
> I'm using freetds 0.64 with PHP 5.2.0 and Microsoft SQL
> Server 2000. My
> freetds.conf file has tds version 8.0 (7.0 doesn't work either). The
> apache server is running on freeBSD.
>
> Do you need to compile with special options to get output
> parameters to
> work for SQL Server 2000? I think RETVAL is also not working but I'd
> need to test to make sure.
>
> What could be the problem? The PHP version? FreeTDS setup? SQL Server
> version?
>
> Kind regards,
> Gunther

Are you sure store does not return any output?? mssql return output
parameters after all data (rows, errors and so on) are sent. For
instance it can happen that a simple select or an insert return some
token that delays output parameters.

freddy77




Archive powered by MHonArc 2.6.24.

Top of Page