Subject Re: [IBO] IBOQUERY and DBGRID problem
Author Helen Borrie
At 09:58 AM 4/10/2005 +0000, you wrote:
>Hello Everybody !
>I've converted a BDE project into IBO4 ...under Delphi7.
>In my project I've replace the Query by an IBOQUERY.
>I've keep the DBGRID from Delphi...
>My DBGrid is connected to the IBOQUERY with a standard Tdatsource
>(Like the classic DBNavigator used too...).
>I'm using for the connection a TIB_connection and for the
>transaction a TIB_Transaction...
>With the IBOQUERY I use a classic SQL command : SELECT * FROM

Presumably "MYDATABASE" is the name of a table?

>Everythings works fine in viewing mode with the DBGRID...
>But if I want to edit a row, in the dbgrid I've got a message error
>that is saying :"Impossible to edit the selected row...".
>Maybe it's normal...Is it possible to edit line record, for a DBGrid
>connected to a IBOQUERY ?

Certainly. To make your dataset updatable, set the RequestLive property to
True, and make sure that you are using correct KeyLinks. (You can make
more complex SELECTs updatable, too, but there is usually a little more to do.)

For KeyLinks, list the fields in the SELECT part of the statement that are
unique in the dataset. For a simple, one-table query, the primary key
field(s) is/are all you need. If you set KeyLinksAutoDefine to True, IBO
will try to work out the KeyLinks for you.

>(I would like to continue to use the dbgrid because in this project,
>there are so mutch lines code..., so it's more easy to continue to
>use the DBgrid :o))

Sure, you can, as long as you stay with the TDataset-compatible components
(TIBO*) ; although you will find that you will need much less code with
IBO than with the BDE.