Bug

Bug

Postby MarcelCH » Tue 23 Aug 2005 17:14

I want know if sql statement is a select, and for this I use ExecuteNonQuery() command, because for UPDATE, INSERT, and DELETE statements, the return value is the number of rows affected by the command. For all other types of statements, the return value is -1.
OracleConnection con=null;
try
{
string sql = "select * from cl_funcionario";
con = new OracleConnection("User Id=scott;Password=tiger;SID=ORCL;Direct=true;Server=localhost");
OracleCommand cmd = new OracleCommand(sql, con);
cmd.Connection.Open();
cmd.CommandType = CommandType.Text;
int ret = cmd.ExecuteNonQuery();
}
finally
{

con.Close();
}

ret should have -1 by ret=0
MarcelCH
 
Posts: 1
Joined: Tue 23 Aug 2005 16:59

Postby Paul » Mon 29 Aug 2005 06:48

We reproduced your problem and fixed it. This fix will be included in the next OraDirect .NET build.
Paul
 
Posts: 725
Joined: Thu 28 Oct 2004 14:06


Return to dotConnect for Oracle