It works the same by just using the proc name as below!
...new FbCommand("GET_ITEM_ONHANDQTY_NEW",

This is how I first started calling it.

In Delphi we have done this both ways so it was natural to try it when I 
wasn't getting an answer.  In the old Delphi we could use a TQuery 
"SELECT * FROM PROC(:param)..." or a TStoredProc with the name, add the 
param and get the same result.

Delphi and Firebird would treat the proc or view as a table you could 
select from.

Hope I didn't cause a problem with my novice testing...

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