Hi,

Not sure what exactly is happening here as I'm used to dealing with Microsoft SQL server rather than Oracle but here goes:

I have a C# project that connects to an Oracle database using the OracleCommand Object to bring back records but I've been noticing some strange behaviour.

Here is an example, if I have a table in Oracle with 3 rows (or records) in it and run the following query in my code SELECT * FROM MYTABLE it will return only two rows! If I run the same query through TOAD I get all 3 rows.

Does anyone out there know why this is the case?

Recommended Answers

All 3 Replies

You're either looping through the results incorrectly or you're connecting to a different schema where there's a different number of rows to be returned.

Any other possible options are so remote they're not worth considering.

... or you haven't commit the last insert; it usually happens when debugging even to experimented programmers!!!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.