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>
  • Cc: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] SP output parameter problem on 0.63
  • Date: Mon, 21 Nov 2005 14:17:36 -0800

Hi Freddy,

Here is my code:

<?php

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

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

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

$rs = mssql_execute($stmt, false);
var_dump($param2);
mssql_close($con);
}

?>

- Frank

> Il giorno lun, 21/11/2005 alle 11.45 -0800, Frank M. Kromann ha
scritto:
> > Hi List,
> >
> > I'm trying to fix the problems with parameters in the PHP extension,
but
> > it seams the current CVS version of FreeTDS has a problem with output
> > parameters.
> >
> > A freetds.log indicates that the bind function can bind both input
and
> > output parameters and values are returned, but when i call dbnumrets()
the
> > return value is 0.
> >
> > I'm using this procedure:
> >
> > drop procedure sp_test1
> > go
> > create procedure sp_test1 (
> > @param1 varchar(20),
> > @param2 varchar(20) output)
> > as
> > set @param2 = 'abcd'
> > return 0
> >
> > And I have attached the log file.
> >
> > The same code works fine on msdblib under Win32. Any clues ?
> >
> > - Frank
> >
>
> >From log I can say that store procedure is execute and return correct
> values.
> I think that the difference is when FreeTDS return data. Could you post
> PHP code?
> FreeTDS read some token after ms dblib... There is a partial test
> (done_handling) to test this issue but is still not in out roadmap...
>
> freddy77
>
>
> _______________________________________________
> 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