Skip to Content.
Sympa Menu

freetds - Re: [freetds] SP output parameter problem on 0.63

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Frank M. Kromann" <frank AT kromann.info>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] SP output parameter problem on 0.63
  • Date: Tue, 22 Nov 2005 09:44:41 -0800

Hi James,

I changed my procedure to:

drop procedure test_sp3
go
create procedure test_sp3 (
@param1 varchar(20),
@param2 varchar(20) output)
as
set @param2 = 'xyz'
select * from tEntityS
return 0

and my php scipt to:

<?php

if (!extension_loaded("mssql")) {
// dl("php_mssql.dll");
dl("php_dblib.dll");
}

$con = mssql_connect("swwwing.intellefleet.com", "web", "web_user");
if ($con) {
mssql_select_db("swwwing_intellefleet", $con);

$stmt = mssql_init("test_sp3", $con);
$param1 = "abc";
$param2 = "a";
mssql_bind($stmt, "@param1", $param1, SQLVARCHAR);
mssql_bind($stmt, "@param2", $param2, SQLVARCHAR, true);

$rs = mssql_execute($stmt, false);
while ($row = mssql_fetch_row($rs)) ;
mssql_next_result($rs);
var_dump($param2);
mssql_close($con);
}

?>

The result is still the same. It works with ntwdblib.lib but not with
dblib.lib from FreeTDS.

- Frank


> > From: Frank M. Kromann
> > Sent: Tuesday, November 22, 2005 1:16 AM
> >
> > > I updated src/dblib/unittests/rpc.c to make it a little more
> > > rigorous and
> > > make the output easier to read. The test uses 4 output parameters
> > > and returns correctly.
> >
> > When did you do this? I'll update from CVS when I get to work
> > tomorrow (PST).
>
> $ ident src/dblib/unittests/rpc.c
> src/dblib/unittests/rpc.c:
> $Id: rpc.c,v 1.24 2005/11/22 04:22:53 jklowden Exp $
>
> > Not sure if I mentioned it but linking the PHP extension with
> > ntwdblib (Microsofts old library) works fine but dblib.lib from
> > FreeTDS does not work on Win32 or on Linux.
>
> Yeah, that's what worries me. Someone's going to have to change the
> code, and it looks to be you or us. ;-)
>
> My RPC test harness is written in perl and doesn't handle output
> parameters. I'll see what I can cook up.
>
> Regards,
>
> --jkl
>
> -----------------------------------------
> The information contained in this transmission may be privileged and
> confidential and is intended only for the use of the person(s) named
> above. If you are not the intended recipient, or an employee or agent
responsible
> for delivering this message to the intended recipient, any review,
dissemination,
> distribution or duplication of this communication is strictly
prohibited. If you are
> not the intended recipient, please contact the sender immediately by
reply e-mail
> and destroy all copies of the original message. Please note that we do
not accept
> account orders and/or instructions by e-mail, and therefore will not be
responsible
> for carrying out such orders and/or instructions. If you, as the
intended recipient
> of this message, the purpose of which is to inform and update our
clients, prospects
> and consultants of developments relating to our services and products,
would not
> like to receive further e-mail correspondence from the sender, please
"reply" to the
> sender indicating your wishes. In the U.S.: 1345 Avenue of the
Americas, New York,
> NY 10105.
> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
>







Archive powered by MHonArc 2.6.24.

Top of Page