I have got the following code
using (OracleConnection con = new OracleConnection())
{
con.ConnectionString = My_connection_string;
FileInfo file = new FileInfo(Server.MapPath("~/Scripts/call_proc.sql"));
string script = file.OpenText().ReadToEnd();
con.Open();
OracleCommand cmd = new OracleCommand(script, con);
cmd.CommandType = CommandType.StoredProcedure;
cmd.BindByName = true;
cmd.ExecuteNonQuery();
}
The call_proc code is //returns Hello
set serveroutput on;
begin
test.tmp_test();
end;
When I try to run the above code it gives me the following errors.
ORA-06550: line 1, column 11: PL/SQL: ORA-00922: missing or invalid option ORA-06550: line 1, column 7:
OracleCommandwith the procedure name? For sample:new OracleCommand("test.temp_test", con);