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 / Languages / C# / January 2008

Tip: Looking for answers? Try searching our database.

CaseSensitive list of tables from C#

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
abbeyro@gmail.com - 07 Jan 2008 17:39 GMT
Hello,

I'm trying to retrieve a list of tables from all_tables in a given
Oracle db. I'm using System.Data.OracleClient, OracleCommand and
OracleDataReader and I always obtain the results in uppercase. The
problem is that some tables where defined in "Mixed/Case" so when I
retrieve the list I need to obtain the exact case used when they were
created. Is there any option I need to specify in the connection or
the data provider to achieve this? From the SQL command line I do get
the right case, the problem happens only from C#. Any advice is
welcome.

Thank-you.
Abbeyro
Nicholas Paldino [.NET/C# MVP] - 07 Jan 2008 17:53 GMT
Abbeyro,

   ALL_TABLES seems to store the table name in upper case (as do most
dictionary views in Oracle):

http://www.suite101.com/article.cfm/oracle/115853/2

http://archives.postgresql.org/pgsql-jdbc/2002-11/msg00146.php

   Although the second link seems to suggest that if you quote the table
name upon creation, it will retain the table name (you should test this out
first).

Signature

         - Nicholas Paldino [.NET/C# MVP]
         - mvp@spam.guard.caspershouse.com

> Hello,
>
[quoted text clipped - 10 lines]
> Thank-you.
> Abbeyro
abbeyro@gmail.com - 07 Jan 2008 21:58 GMT
On Jan 7, 12:53 pm, "Nicholas Paldino [.NET/C# MVP]"
<m...@spam.guard.caspershouse.com> wrote:
Although the second link seems to suggest that if you quote the table
> name upon creation, it will retain the table name (you should test this out
> first).

Thanks for your reply Nicholas. I already verified that all_tables
actually returns the proper case, by using Oracle's command line.
The issue therefore seems to be with the Microsoft adapter that
returns everything uppercase.

Created as: "my/table"
From shell: my/table
From .NET: MY/TABLE

Is there any way to specify that this shouldn't be the correct
behavior?

Thank-you in advance.

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.