Last post Feb 18, 2012 04:41 AM by Decker Dong - MSFT
Feb 16, 2012 09:20 AM|mishra.bhupesh|LINK
I have a package in my Oracle database having procedures insertToEmp(), DeleteFromEmp() etc. I want to call these procedures from C#. Is it Possible to call a stored procedure of a package in oracle form my C# & ASP.NET application???
Feb 16, 2012 09:34 AM|duzi|LINK
Ofcourse it is possible/ you should use the connection and the command types of Oracle exactly as you use it in sql.
OracleCommand for commands and OracleParameter and OracleConnection....
Just add on the top of the file: using Syste.Data.OracleClient;
Hope I helped...
Feb 16, 2012 09:52 AM|mishra.bhupesh|LINK
But as I know while calling to a stored procedure :
//we adds parameters to above procedur.
But I want to know how to call a procdure from a package that is stored in oracle database. Kindly help me be delivering some lines of code.
Thanks again .
Feb 16, 2012 10:09 AM|morefays|LINK
Packages and storeprocedure are same thing just calling package like this "SAS_SYS_PROC.PKG_ALERTS.INS_ALERTS"
Feb 18, 2012 04:41 AM|Decker Dong - MSFT|LINK
Addition——Don't forget to add cmd.CommandType=CommandType.StoredProcedure before executing ExecuteNonQuery() or do query things。
For more you can see the sample：http://www.c-sharpcorner.com/UploadFile/john_charles/CallingOraclestoredproceduresfromMicrosoftdotNET06222007142805PM/CallingOraclestoredproceduresfromMicrosoftdotNET.aspx（See