Additional
Overview
Features
Known issues
FAQ
Support
Credits and license
History
Download
Forum
During Post or ApplyUpdates i get NOE129/Q exception. What this mean ? PDF Print E-mail
Sep 19, 2006

NCOCI8 can raise exception 'NOE129/Q - Can not execute query, undefined key fields' during applying updates to database. This may be in case of ApplyUpdates if ChachedUpdates = True or Post if False. What this mean ?

When NCOCI8 builds updating query (UPDATE / DELETE), it must determine WHERE clause. It completely depends on TOCIDataSet.UpdateMode or TOCIUpdateSQL.UpdateMode:
 

UpdateModeNote
upWhereAllIn WHERE clause nas been included every field
upWhereChanged.. only changed and key fields
upWhereKeyOnly.. only key fields

As you can seen in case of upWhereChanged and upWhereKeyOnly NCOCI8 need to know, what fields are key fields. So, how we can detect it ? There are two ways:

  • Automatically. If NCOCI8 finds in SELECT list field this type ROWID, and there are no other fields, that are marked as key fields, it use this ROWID field as key field.
  • Programmer assist. Programmer can mark some fields as key fields. Then NCOCI8 will use it as key fields. To mark include pfInKey into TField.ProviderFlags.

So, if you get NOE129/Q, you must either include ROWID field (with any name, NCOCI8 sees only to data type) into SELECT list, or include pfInKey into TField.ProviderFlags of some fields. Last may be usable, if you have complex query, in that never table preserves ROWID uniqueness.

 
Previous   Next