Oracle.DataAccess.Client.OracleCommand.ExecuteNonQuery() interrupts execution of the whole program [modified]
-
Hello people of CP, I have a problem and would like you to help me fix it. The problem is that right after I call a stored procedure calling the method stated in the title, the execution of the program is interrupted without any warning or prompt whatsoever. The code block is this:
public virtual object Execute()
{ return this.command.ExecuteNonQuery();
}I know the command executes because the state in the DataBase is changed. But right after the
return this.command.ExecuteNonQuery();
line, the program just stops. It doesn't throw an exception, it doesn't even go to the last bracket of the method, the program just exits. So, any idea what this might be? Thanks a lot! Edit: Here's a clearer example:private void SetSystemEnviroment()
{
try
{
using (OracleCommand command = this.con.CreateCommand())
{
command.CommandText = "SetSystemEnviroment";
command.CommandType = CommandType.StoredProcedure;command.ExecuteNonQuery(); } } catch (Exception ex) { MessageBox.Show(ex.Message); return; } }
Again, after the
command.ExecuteNonQuery();
line, it just stops the execution of the program, no warnings, no exceptions, nothing.modified on Monday, July 25, 2011 6:23 PM
-
Hello people of CP, I have a problem and would like you to help me fix it. The problem is that right after I call a stored procedure calling the method stated in the title, the execution of the program is interrupted without any warning or prompt whatsoever. The code block is this:
public virtual object Execute()
{ return this.command.ExecuteNonQuery();
}I know the command executes because the state in the DataBase is changed. But right after the
return this.command.ExecuteNonQuery();
line, the program just stops. It doesn't throw an exception, it doesn't even go to the last bracket of the method, the program just exits. So, any idea what this might be? Thanks a lot! Edit: Here's a clearer example:private void SetSystemEnviroment()
{
try
{
using (OracleCommand command = this.con.CreateCommand())
{
command.CommandText = "SetSystemEnviroment";
command.CommandType = CommandType.StoredProcedure;command.ExecuteNonQuery(); } } catch (Exception ex) { MessageBox.Show(ex.Message); return; } }
Again, after the
command.ExecuteNonQuery();
line, it just stops the execution of the program, no warnings, no exceptions, nothing.modified on Monday, July 25, 2011 6:23 PM
-
Hello people of CP, I have a problem and would like you to help me fix it. The problem is that right after I call a stored procedure calling the method stated in the title, the execution of the program is interrupted without any warning or prompt whatsoever. The code block is this:
public virtual object Execute()
{ return this.command.ExecuteNonQuery();
}I know the command executes because the state in the DataBase is changed. But right after the
return this.command.ExecuteNonQuery();
line, the program just stops. It doesn't throw an exception, it doesn't even go to the last bracket of the method, the program just exits. So, any idea what this might be? Thanks a lot! Edit: Here's a clearer example:private void SetSystemEnviroment()
{
try
{
using (OracleCommand command = this.con.CreateCommand())
{
command.CommandText = "SetSystemEnviroment";
command.CommandType = CommandType.StoredProcedure;command.ExecuteNonQuery(); } } catch (Exception ex) { MessageBox.Show(ex.Message); return; } }
Again, after the
command.ExecuteNonQuery();
line, it just stops the execution of the program, no warnings, no exceptions, nothing.modified on Monday, July 25, 2011 6:23 PM
I miss the Command.Connection.Open() before you executeNonQuery()
In Word you can only store 2 bytes. That is why I use Writer.