Many Oracle system views cannot be used with TUniTable

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
cbc700
Posts: 46
Joined: Fri 03 Aug 2007 17:25

Many Oracle system views cannot be used with TUniTable

Post by cbc700 » Thu 05 Dec 2013 03:37

Hello. I find that a TUniTable cannot access the Oracle view "ALL_ALL_TABLES", and many other similar views. The following exception is thrown: "ORA-01446: cannot select ROWID from, or sample, a view with DISTINCT, GROUP BY, etc."

I think this is related to how the TUniTable accesses it -- if you double click the table, in the SQL tab, we find:

SELECT T.RowId, T.*
FROM ALL_ALL_TABLES T

I don't think these special views have the special column ROWID.

I know I could query these, but I really could use table access to it.

Is there a way around this? If not, can this be addressed in a future release?

Thanks.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Many Oracle system views cannot be used with TUniTable

Post by AlexP » Fri 06 Dec 2013 10:34

Hello,

The ROWID column is added only in case if you have not explicitly specified KeyFields and we cannot define them automatically. This is needed to correctly build queries for editing, deleting, etc.
To solve the problem, you can either specify KeyFields by yourself or set the ReadOnly property of the table to True, if editing is not planned.

cbc700
Posts: 46
Joined: Fri 03 Aug 2007 17:25

Re: Many Oracle system views cannot be used with TUniTable

Post by cbc700 » Fri 06 Dec 2013 14:23

Thanks. I can certainly treat these views as ReadOnly. FYI -- even with the table set to ReadOnly, the same exception is thrown for the "ALL_ALL_TABLES" view.

However, for the views, I can actually use a query, so I'm good. Thank you.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Many Oracle system views cannot be used with TUniTable

Post by AlexP » Mon 09 Dec 2013 09:44

Hello,

Thank you for the information, we have fixed the TOraTable behaviour - from now, no RowID field will be added to a ReadOnly DataSet. Yes, you can use TOraQuery for writing your own queries for both tables and views.

cbc700
Posts: 46
Joined: Fri 03 Aug 2007 17:25

Re: Many Oracle system views cannot be used with TUniTable

Post by cbc700 » Mon 16 Dec 2013 04:07

Thank you. The table behavior change is even better. Of course, this will appear in the next build of UniDAC I take it? Do we have a rough estimate for it?

Thanks again.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Many Oracle system views cannot be used with TUniTable

Post by AlexP » Mon 16 Dec 2013 08:50

Hello,

We plan to release the DAC products this week.

Post Reply