C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » ASP.NET »

what wrong in this procedure


Posted Date: 27 Aug 2008      Posted By: vaddesreenivasulu      Member Level: Gold     Points: 1   Responses: 4



iam getting "No data - zero rows fetched, selected, or processed" error
what can i do

DELIMITER $$

DROP PROCEDURE IF EXISTS `testfull`.`sp_SaveInventoryIssueInfo` $$
CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_SaveInventoryIssueInfo`(

paClientID smallint(5),
paPersonID mediumint(8),
paSportID mediumint(8),
paEquipmentID mediumint(8),
paItemCode mediumint(8),

paConditionID tinyint(3),
paQuantity smallint(5),

paIssueDate date,
paDueDate date,
paIssuer SMALLINT(5),

paReason VARCHAR(255),

paNotes VARCHAR(255),
paTransType TINYINT(3),
paPackageID integer,

paPersonName VARCHAR(50)

)
COMMENT 'Save/Update the Athletes Issue details'
BEGIN

declare intCount smallint(5);
declare intInvoiceId SMALLINT(5);
declare intOrderID SMALLINT(5);


if paPersonID=0 then
begin
select clientid into intCount from tbltransactions
where ClientID=paClientID and PersonID=paPersonID and SportID=paSportID and
EquipmentID=paEquipmentID and ItemCode=paItemCode and TransType=paTransType and PersonName=paPersonName limit 1;
END;
else
begin
select clientid into intCount from tbltransactions
where ClientID=paClientID and PersonID=paPersonID and SportID=paSportID and
EquipmentID=paEquipmentID and ItemCode=paItemCode and TransType=paTransType limit 1;
END;
END if;




if isnull(intCount)=1 then
begin

select InvoiceID into intInvoiceId from tblinventory
where ClientID=paClientID and ItemCode=paItemCode;

select OrderID into intOrderID from tblinventory
where ClientID=paClientID and ItemCode=paItemCode;

if isnull(intInvoiceId)=1 then
begin
set intInvoiceId=0;
END;
END if;

if isnull(intOrderID)=1 then
begin
set intOrderID=0;
END;
END if;



insert into tbltransactions (ClientID,PersonID,SportID,EquipmentID,ItemCode,
ConditionID,Quantity,DueDate,Issue_ReturnDate,Issuer,Reason ,Notes ,TransType,EstimatedCost,ActualCost,InvoiceID,OrderID,PersonName,PackageID)
values(paClientID,paPersonID,paSportID,paEquipmentID,paItemCode,paConditionID,paQuantity,paDueDate,paIssueDate,
paIssuer,paReason,paNotes,paTransType,'','',intInvoiceId,intOrderID,paPersonName,paPackageID);

END;

else
begin

if paPersonID=0 then
begin
update tbltransactions set ConditionID=paConditionID,Quantity=paQuantity,DueDate=paDueDate,Issue_ReturnDate=paIssueDate,Issuer=paIssuer,
Reason=paReason,Notes=paNotes,PersonName=paPersonName
where ClientID=paClientID and PersonID=paPersonID and SportID=paSportID and
EquipmentID=paEquipmentID and TransType=paTransType and itemcode=paItemCode and PersonName=paPersonName ;
END;
else
begin
update tbltransactions set ConditionID=paConditionID,Quantity=paQuantity,DueDate=paDueDate,Issue_ReturnDate=paIssueDate,Issuer=paIssuer,
Reason=paReason,Notes=paNotes,PersonName=paPersonName
where ClientID=paClientID and PersonID=paPersonID and SportID=paSportID and
EquipmentID=paEquipmentID and TransType=paTransType and itemcode=paItemCode;
END;
END if;




END;
END if;

END $$

DELIMITER ;





Responses

Author: saroop    27 Aug 2008Member Level: SilverRating: 2 out of 52 out of 5     Points: 1

pls tell ur table structure and ur requirement for the sp


Author: mythili d    27 Aug 2008Member Level: SilverRating: 2 out of 52 out of 5     Points: 2

Kugan is right for all your input parameters should have @symbol because these are variables from which you want to input values.


Author: vaddesreenivasulu    27 Aug 2008Member Level: GoldRating: 2 out of 52 out of 5     Points: 2

iam using mysql if one record in tha table it will works fine other wise giving error
"No data - zero rows fetched, selected, or processed"



Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.


Next : Relative positioning of controls in %?
Previous : checkbox control
Return to Discussion Forum
Post New Message
Category: ASP.NET

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use