CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 how to: store procedure

Print topic Send  topic

Author Message
boolean

Posts: 62
Posted: 10/28/2010, 1:45 PM

Hi there,
I am trying to use stored procedure in CCS for the first time, and it doesn't work.

I have a procedure which executes correctly in MySQL server

CREATE PROCEDURE `getPartInfo`(IN i_PartNo VARCHAR(25))
BEGIN
SELECT * FROM partinfo WHERE part_no = i_PartNo;
END;

In CCS, I have

$SQL = "CALL getPartInfo('1230')";
$db = new clsDBIntranetConn();
$db->query($SQL);
$rs = $db->next_record();
if ($rs)
{
$Result .= $db->f(0);
}
else
{
$Result .= "Failed: ".mysql_error()."<br>";
}
$db->closed();

The result is

Failed: PROCEDURE Intranetdb.getPartInfo can't return a result set in the given context


Would you please point out what I am doing wrong? Thanks alot.
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.