TbDossier: Key field 'SYS_NC00048$' not found

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
rc
Posts: 11
Joined: Thu 24 Dec 2009 13:46
Location: France

TbDossier: Key field 'SYS_NC00048$' not found

Post by rc » Mon 28 Oct 2013 14:42

I work with Unidac components on PostgreSql and Oracle databases.
In PostgreSql, my program works fine. In Oracle, I get this message when I try to insert a line from TUnitable TbDossier :
TbDossier: Key field 'SYS_NC00048$' not found
Inserting the line directly in the database (using SQLDeveloper) works fine.

Indeed field SYS_NC00048$ does not exist and is not referenced either in database nor in my program.

Hax anyone an idea about the origin of my problem ?

Thanks.

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

Re: TbDossier: Key field 'SYS_NC00048$' not found

Post by AlexP » Mon 28 Oct 2013 14:57

Hello,

Please provide the TbDossier table script.

rc
Posts: 11
Joined: Thu 24 Dec 2009 13:46
Location: France

Re: TbDossier: Key field 'SYS_NC00048$' not found

Post by rc » Tue 29 Oct 2013 15:01

I found the origin of the problem : I had a function based index on this table. And in this case, Oracle add to the table an hidden column named SYS_NC000x to store the results of the function.

Apparently DbAccess TDaDatasetService.FillKeyFieldDescs method detected the existence of this column, but was not able to retrieve it.

I modified the index in order not to use any function in it, and the problem disappeared.

Thank you for you interest

Roland

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

Re: TbDossier: Key field 'SYS_NC00048$' not found

Post by AlexP » Wed 30 Oct 2013 07:13

Hello,

Glad to see that you solved the problem. If you have any other questions, feel free to contact us

Post Reply