AW: can"t return a result set in the given context
AW: can"t return a result set in the given context
am 01.04.2008 14:03:11 von Gisbert.Selke
> -----Ursprüngliche Nachricht-----
> Von: Wechsler, Steven [mailto:Steven.Wechsler@mtvstaff.com]
> Gesendet: Montag, 31. März 2008 23:14
> I get the above error whenever I try to call a stored procedure using
> DBI with DBD::MySQL. The exact message is:
>=20
> DBD::mysql::st execute failed: PROCEDURE can't return a
> result set in the given context at /dba/steve/scripts/run_sql.pl line
> 517, line 2.
>=20
> Here is the connect string:
>=20
> $dsn =3D
> DBI:mysql:database=3D;host=3D;port=3D3316;mysql_mu
> lti_result
> s=3D1
> DBI->connect($dsn, $login, $password,
> {PrintError =3D> 1, AutoCommit =3D> 1,
> syb_err_handler =3D>=20
> \&message_handler } )
>=20
>=20
> DBD::mysql version is 3.0007
It may be hard to tell for anyone not knowing the stored procedure that =
you
try to call, and not knowing the "given context" that is, in fact, not
given.
On a side note, are you sure you want a syb_err_handler for a MySQL
connection?
\Gisbert
--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=3Dgcdmp-msql-mysql-modules @m.gmane.org
RE: can"t return a result set in the given context
am 01.04.2008 15:42:21 von steven.wechsler
It's a simple stored proc that returns two result sets (but the script =
doing the calling needs to be able to handle any stored proc, since it's =
not aware of what it's calling).
The stored proc call is a simple=20
> call storedproc;
The context is just a simple execute command, which is where it gets the =
error (i.e. it doesn't actually execute the stored procedure):
$rc =3D $sth->execute();
As far as the syb_err_handler is concerned, it can handle Sybase, SQL =
Server and MySQL. The name is a legacy, because the script was =
originally written for Sybase.
Thanks,
Steve
Steve Wechsler | steven.wechsler@mtvstaff.com
Sybase/SQL Server/MySQL Database Administrator
212-846-5683
MTV Networks
-----Original Message-----
From: Selke, Gisbert W. [mailto:Gisbert.Selke@wido.bv.aok.de]=20
Sent: Tuesday, April 01, 2008 8:03 AM
To: Wechsler, Steven
Cc: perl@lists.mysql.com
Subject: AW: can't return a result set in the given context
> -----Ursprüngliche Nachricht-----
> Von: Wechsler, Steven [mailto:Steven.Wechsler@mtvstaff.com]
> Gesendet: Montag, 31. März 2008 23:14
> I get the above error whenever I try to call a stored procedure using
> DBI with DBD::MySQL. The exact message is:
>=20
> DBD::mysql::st execute failed: PROCEDURE can't return a
> result set in the given context at /dba/steve/scripts/run_sql.pl line
> 517, line 2.
>=20
> Here is the connect string:
>=20
> $dsn =3D
> DBI:mysql:database=3D;host=3D;port=3D3316;mysql_mu
> lti_result
> s=3D1
> DBI->connect($dsn, $login, $password,
> {PrintError =3D> 1, AutoCommit =3D> 1,
> syb_err_handler =3D>=20
> \&message_handler } )
>=20
>=20
> DBD::mysql version is 3.0007
It may be hard to tell for anyone not knowing the stored procedure that =
you
try to call, and not knowing the "given context" that is, in fact, not
given.
On a side note, are you sure you want a syb_err_handler for a MySQL
connection?
\Gisbert
--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=3Dgcdmp-msql-mysql-modules @m.gmane.org
Re: can"t return a result set in the given context
am 01.04.2008 16:16:20 von Patrick Galbraith
Steven,
Hmm, this should work. Have you tried the latest DBD version? Also,
there's a test in the driver source, in the "t" directory 80procs.t
might be worth looking at.
--Patrick
Wechsler, Steven wrote:
>It's a simple stored proc that returns two result sets (but the script doing the calling needs to be able to handle any stored proc, since it's not aware of what it's calling).
>
>The stored proc call is a simple
>
>
>
>>call storedproc;
>>
>>
>
>The context is just a simple execute command, which is where it gets the error (i.e. it doesn't actually execute the stored procedure):
>
>$rc = $sth->execute();
>
>As far as the syb_err_handler is concerned, it can handle Sybase, SQL Server and MySQL. The name is a legacy, because the script was originally written for Sybase.
>
>Thanks,
>
>Steve
>
>
>
>Steve Wechsler | steven.wechsler@mtvstaff.com
>Sybase/SQL Server/MySQL Database Administrator
>212-846-5683
>
>MTV Networks
>
>
>-----Original Message-----
>From: Selke, Gisbert W. [mailto:Gisbert.Selke@wido.bv.aok.de]
>Sent: Tuesday, April 01, 2008 8:03 AM
>To: Wechsler, Steven
>Cc: perl@lists.mysql.com
>Subject: AW: can't return a result set in the given context
>
>
>
>>-----Ursprüngliche Nachricht-----
>>Von: Wechsler, Steven [mailto:Steven.Wechsler@mtvstaff.com]
>>Gesendet: Montag, 31. März 2008 23:14
>>I get the above error whenever I try to call a stored procedure using
>>DBI with DBD::MySQL. The exact message is:
>>
>>DBD::mysql::st execute failed: PROCEDURE can't return a
>>result set in the given context at /dba/steve/scripts/run_sql.pl line
>>517, line 2.
>>
>>Here is the connect string:
>>
>>$dsn =
>>DBI:mysql:database=;host=;port=3316;mysql_mu
>>lti_result
>>s=1
>>DBI->connect($dsn, $login, $password,
>> {PrintError => 1, AutoCommit => 1,
>> syb_err_handler =>
>>\&message_handler } )
>>
>>
>>DBD::mysql version is 3.0007
>>
>>
>It may be hard to tell for anyone not knowing the stored procedure that you
>try to call, and not knowing the "given context" that is, in fact, not
>given.
>On a side note, are you sure you want a syb_err_handler for a MySQL
>connection?
>
>\Gisbert
>
>
>
--
Patrick Galbraith, Senior Programmer
Grazr - Easy feed grazing and sharing
http://www.grazr.com
Satyam Eva Jayate - Truth Alone Triumphs
Mundaka Upanishad
--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org
RE: can"t return a result set in the given context
am 01.04.2008 16:53:55 von steven.wechsler
That was it - Version 4.006 fixed it.
Thanks,
Steve
Steve Wechsler | steven.wechsler@mtvstaff.com
Sybase/SQL Server/MySQL Database Administrator
212-846-5683
MTV Networks
-----Original Message-----
From: Patrick Galbraith [mailto:patg@grazr.com]=20
Sent: Tuesday, April 01, 2008 10:16 AM
To: Wechsler, Steven
Cc: perl@lists.mysql.com
Subject: Re: can't return a result set in the given context
Steven,
Hmm, this should work. Have you tried the latest DBD version? Also,=20
there's a test in the driver source, in the "t" directory 80procs.t=20
might be worth looking at.
--Patrick
=20
Wechsler, Steven wrote:
>It's a simple stored proc that returns two result sets (but the script =
doing the calling needs to be able to handle any stored proc, since it's =
not aware of what it's calling).
>
>The stored proc call is a simple=20
>
> =20
>
>>call storedproc;
>> =20
>>
>
>The context is just a simple execute command, which is where it gets =
the error (i.e. it doesn't actually execute the stored procedure):
>
>$rc =3D $sth->execute();
>
>As far as the syb_err_handler is concerned, it can handle Sybase, SQL =
Server and MySQL. The name is a legacy, because the script was =
originally written for Sybase.
>
>Thanks,
>
>Steve
>
>
>
>Steve Wechsler | steven.wechsler@mtvstaff.com
>Sybase/SQL Server/MySQL Database Administrator
>212-846-5683
>
>MTV Networks
>
>
>-----Original Message-----
>From: Selke, Gisbert W. [mailto:Gisbert.Selke@wido.bv.aok.de]=20
>Sent: Tuesday, April 01, 2008 8:03 AM
>To: Wechsler, Steven
>Cc: perl@lists.mysql.com
>Subject: AW: can't return a result set in the given context
>
> =20
>
>>-----Ursprüngliche Nachricht-----
>>Von: Wechsler, Steven [mailto:Steven.Wechsler@mtvstaff.com]
>>Gesendet: Montag, 31. März 2008 23:14
>>I get the above error whenever I try to call a stored procedure using
>>DBI with DBD::MySQL. The exact message is:
>>
>>DBD::mysql::st execute failed: PROCEDURE can't return a
>>result set in the given context at /dba/steve/scripts/run_sql.pl line
>>517, line 2.
>>
>>Here is the connect string:
>>
>>$dsn =3D
>>DBI:mysql:database=3D;host=3D;port=3D3316;mysql_mu
>>lti_result
>>s=3D1
>>DBI->connect($dsn, $login, $password,
>> {PrintError =3D> 1, AutoCommit =3D> 1,
>> syb_err_handler =3D>=20
>>\&message_handler } )
>>
>>
>>DBD::mysql version is 3.0007
>> =20
>>
>It may be hard to tell for anyone not knowing the stored procedure that =
you
>try to call, and not knowing the "given context" that is, in fact, not
>given.
>On a side note, are you sure you want a syb_err_handler for a MySQL
>connection?
>
>\Gisbert
>
> =20
>
--=20
Patrick Galbraith, Senior Programmer=20
Grazr - Easy feed grazing and sharing
http://www.grazr.com=20
Satyam Eva Jayate - Truth Alone Triumphs
Mundaka Upanishad
--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=3Dgcdmp-msql-mysql-modules @m.gmane.org