J
jamesd
I believe I may be encountering a bug in the way
System.Data.OracleClient is issuing commands:
The following code you will see that the CommandText is different.
OracleConnection con = new OracleConnection();
con.ConnectionString = SelectConnectionStringOracle();
con.Open();
OracleCommand cmd = con.CreateCommand();
cmd.CommandText = "select * from kellya.GEMSDATA WHERE
ROWNUM <= 10";//RETURNS NO RECORDS
cmd.CommandText = "select * from irdb.GRANTS WHERE ROWNUM
<= 10";//WORKS GREAT
cmd.CommandType = CommandType.Text;
OracleDataAdapter da = new OracleDataAdapter(cmd);
DataTable dt = new DataTable();
da.Fill(dt);
Debug.WriteLine(dt.Rows.Count);
con.Close();
return dt;
The "kellya.GEMSDATA" returns no records, it only returns an empty
datatable with the column names, BUT no datarows. Even though when I
use oracle TOAD to select records it returns all the records! So I know
that the data is there, it just won't return the rows.
If it matters, kellya.GEMSDATA is a temp table in oracle that I
created, and I am logged in as kellya
To reiterate, when .NET/OracleClient issues command "select * from
kellya.GEMSDATA WHERE ROWNUM <= 10" no rows are returned, but a SqlPlus
and Toad return rows when that command is issued.
Please help, this is driving me crazy for too many days now. I have
tried everything I can think of.
System.Data.OracleClient is issuing commands:
The following code you will see that the CommandText is different.
OracleConnection con = new OracleConnection();
con.ConnectionString = SelectConnectionStringOracle();
con.Open();
OracleCommand cmd = con.CreateCommand();
cmd.CommandText = "select * from kellya.GEMSDATA WHERE
ROWNUM <= 10";//RETURNS NO RECORDS
cmd.CommandText = "select * from irdb.GRANTS WHERE ROWNUM
<= 10";//WORKS GREAT
cmd.CommandType = CommandType.Text;
OracleDataAdapter da = new OracleDataAdapter(cmd);
DataTable dt = new DataTable();
da.Fill(dt);
Debug.WriteLine(dt.Rows.Count);
con.Close();
return dt;
The "kellya.GEMSDATA" returns no records, it only returns an empty
datatable with the column names, BUT no datarows. Even though when I
use oracle TOAD to select records it returns all the records! So I know
that the data is there, it just won't return the rows.
If it matters, kellya.GEMSDATA is a temp table in oracle that I
created, and I am logged in as kellya
To reiterate, when .NET/OracleClient issues command "select * from
kellya.GEMSDATA WHERE ROWNUM <= 10" no rows are returned, but a SqlPlus
and Toad return rows when that command is issued.
Please help, this is driving me crazy for too many days now. I have
tried everything I can think of.