Oracle query returns table structure but no lines

  • Thread starter Thread starter AW
  • Start date Start date
A

AW

Hello,

I'm using Microsoft's OracleClient (part of the v1.1 framework) to access an
Oracle database. I issue a select statement which is supposed to return
lines from a table, but no line is returned.

The method I use is an OracleDataAdapter that fills a DataTable. Strangely
enough, after the Fill the DataTable has Columns corresponding to the
columns in the requested table, but the Rows.Count is 0.

I tried to use a OracleCommand with ExecuteReader() instead. But it returns
no row.

The select query is very simple: "select Name,Age from employees"

Of course I tested my code with SQL server and it works alright. Am I
missing something?

Thanks for your help,
Arnaud
 
I just found out the problem. It has nothing to do with OracleClient. The
fact is that I had to COMMIT the inserts I had made with the SQLPlus
interface, because a transaction was implicitely started. I didn't realize
this because when I was making selects in the SQLPlus interface I could see
the lines since I was in the transaction.

Shame on me.
 
Back
Top