Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / ADO.NET / April 2006

Tip: Looking for answers? Try searching our database.

possible bug in oracleclient

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
jamesd - 10 Apr 2006 21:15 GMT
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.
Jeff Dillon - 10 Apr 2006 21:55 GMT
"Temp table"? Looks like a permanent table to me...although I only work with
SQL Server

But 10 seconds on Google via "temp table oracle"

Create global temporary table tempTable
(
id number,
value number
);

This creates a table that is visible to all sessions, but only the data
placed in the table is visible for the current working session. The temp
table is resident until the session that created it is closed

>I believe I may be encountering a bug in the way
> System.Data.OracleClient is issuing commands:
[quoted text clipped - 32 lines]
> Please help, this is driving me crazy for too many days now. I have
> tried everything I can think of.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.