Subject Re: TIB_Grid doesn't accept edits
Author Svein Erling Tysvær
--- In, "Roberto Freitas" wrote:
> I'm relatively new with IBO, so I need some help.
> My program has a DataModule and a Form.
> In the DM, there is a TIB_Query with a TIB_DataSource, and in the
> form there is a TIB_Grid and a TIB_UpdateBar both with DataSource
> property pointing to the TIB_DataSource defined in DM.
> Nothing special, all trivial, everything setted to the default
> options. When form shows, the TIB_Grid is populated with records, as
> expected, using a explicit transaction with tiCommitted isolation.
> But only the Insert button is enabled in the TIB_UpdateBar, and I
> can't edit or delete any record.
> What could be the problem?

My guess is that IBO isn't capable of uniquely identifying each
record. This is the case if either:

-you haven't defined keys in your tables
-you JOIN tables,
-you don't select any key or uniquely indexed field
-KeyLinks is incorrect, or
-KeylinksAutoDefine is false

In general, the find is to identify the field(s) that uniquely
identifies one record and write the name of those fields in KeyLinks.
In quite a few cases, IBO itself can figure out what needs to be the
KeyLinks, and in such cases it is enough to just set
KeyLinksAutoDefine to true.

Good luck,