It appears to do so.  It returns the correct answer 270 (decimal) which 
is unique to this itemId.  I will try it with just the proc name and see 
what happens and let you know.

In the debug it shows:
[FirebirdSql.Data.FirebirdClient.FbParameterCollection]
parameters [0]
ParameterName - Value "@ITEMID"
Value         - 263

The actual proc from the db is below:

CREATE PROCEDURE GET_ITEM_ONHANDQTY_NEW
(
   ITEMID INTEGER
)
RETURNS
(
   ONHANDQTY NUMERIC(15, 3)
)
AS
BEGIN
   FOR
     SELECT SUM(A.QTY) FROM INVMVITEM A WHERE A.ITEMID = :ITEMID
     INTO :ONHANDQTY
   DO
     SUSPEND;
END
  ^

Carlos Guzmán Álvarez wrote:
> Hello:
>> FbCommand fbCommand = new FbCommand("SELECT * FROM 
>> GET_ITEM_QTYSUM(@ITEMID, fbConnection);
>>   
> This looks to be incorrect, hope it's:
> 
> FbCommand fbCommand = new FbCommand("SELECT * FROM GET_ITEM_QTYSUM(@ITEMID)", 
> fbConnection);
> 
>> fbCommandType = System.Data.CommandType.StoredProcedure;
>>   
> If you are trying to set the CommandType ( this code isn't doing so but 
> to be sure )
> to StoredProcedure it isn't needed as you are trying to run a SELECT query.
>> fbCommand.Parameters.AddWithValue("@ITEMID", itemId);
>>   
> Can you check that the parameter gets added correctly, please ??
> 
> 

All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
Firebird-net-provider mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to