Hi,
I'm trying to do a straight forward call to an Oracle Stored Procedure from a GridView Web Control using UpdateQuery. I created a simple procedure (then tried a package) with no parameters (then with a parameter) and tried to call it from UpdateQuery.
I either get a Internal .Net Framework Data Provider error 30 with a parameter or
Encountered the symbol "UARF_FUNCTIONAL_UPDATE" when expecting one of the following:
:= . ( @ % ;
without using a paremeter.
My updatequery on the sqldatasource control is:
exec uarf_functional_update;
I'm sure I'm missing something very simple (syntax or something), but I can't find the right direction in my help material.
Any assistance would be greatly appreciated.
Vijaya KadiyalaPosted Jul 3, 2008, 1:11 PM
Hi
Check out the below link
http://www.c-sharpcorner.com/UploadFile/john_charles/CallingOraclestoredproceduresfromMicrosoftdotNET06222007142805PM/CallingOraclestoredproceduresfromMicrosoftdotNET.aspx
Thanks -- Vj
http://dotnetvj.blogspot.com
Bechir BejaouiPosted Jun 23, 2008, 1:28 PM
using Oracle.DataAccess.Client;
OracleConnection conn = new OracleConnection(
"Persist Security Info=False;User ID=SCOTT;Password=TIGER;Data Source=MYSERVER;");
conn.Open();
OracleCommand cmd = new OracleCommand("ProcedureName",conn);
cmd.CommandType = CommandType.StoredProcedure;
OracleParameter param1 = new OracleParameter("ParameterName",OracleDbType);
param1.Direction = ParameterDirection.Input;
param1.Value = sCode1;
param1.Parameters.Add(param1);
.
.
.
.
OracleParameter param_n = new OracleParameter("ParameterName",OracleDbType);
param_n.Direction = ParameterDirection.Input;
param_n.Value = sCode1;
cmd.Parameters.Add(param_n);
cmd.ExecuteNonQuery();
conn.Close();
hope that helps you