Subject | Re: [IBO] Problem with records disappear in dbgrid(detail db). |
---|---|
Author | Helen Borrie |
Post date | 2003-11-06T14:16:52Z |
At 01:18 PM 6/11/2003 +0000, you wrote:
you an empty row so that you can insert a new row?
2. Do you see the generator value in the grid when the new "empty" row
appears?
3. Do you see the other key values?
The client has in its buffer an image of rows that it asked for in the
SELECT statement. There is no umbilical cord between the row in the buffer
and the row in the table. If the client opens a line in a grid and inserts
a new row, that row goes into the buffer, but the server has no knowledge
of it until the Post occurs.
When Post is called on an Insert, the data gets to the server by way of an
UPDATE statement constructed by the dataset object. If the IBO dataset
knows the key values before the Post, then it inserts them into the Key
buffer: this enables it to pull the newly inserted row over to the dataset
once the transaction is committed.
Your new rows are going to get "lost" (from the point of view of the
dataset) if those key values are not available to put into the Key buffer.
Helen
>--- In IBObjects@yahoogroups.com, Helen Borrie <helebor@t...> wrote:I'll put the question another way. How are you causing the grid to give
> > At 09:56 PM 5/11/2003 +0000, you wrote:
> >
> > >Sorry I wrote KeyFields but I meant KeyLinks. So what you are
>saying
> > >that I have done it right in KeyLinks then, but why does the lines
> > >disappears after Post and then reappears when you do a Next /
> > >Previous ?
> >
> > Some more questions --
> > Are you calling Insert or Append?
>I'm using a DBGrid so I don't know what it uses.
you an empty row so that you can insert a new row?
> > Where do the PK values for your new rows come from? Does the user1. What does the GeneratorLinks entry look like?
>enter
> > them, or are they generated/calculated on the server?
> >
>Two values come from OnNewRecord on the detail(TIBOTable) and the
>last one is a generator. The generator is listed in the GenatorLinks
>in the TIBODatabase.
2. Do you see the generator value in the grid when the new "empty" row
appears?
3. Do you see the other key values?
>Well I havent work much with Firebird but I have with ADO/MS SQLUmm, not sure what your question means...
>server and same work fine there too. The client has no knowledge of
>the server side I understand but wouldn't that be with exception
>when the client made the change itself ?
The client has in its buffer an image of rows that it asked for in the
SELECT statement. There is no umbilical cord between the row in the buffer
and the row in the table. If the client opens a line in a grid and inserts
a new row, that row goes into the buffer, but the server has no knowledge
of it until the Post occurs.
When Post is called on an Insert, the data gets to the server by way of an
UPDATE statement constructed by the dataset object. If the IBO dataset
knows the key values before the Post, then it inserts them into the Key
buffer: this enables it to pull the newly inserted row over to the dataset
once the transaction is committed.
Your new rows are going to get "lost" (from the point of view of the
dataset) if those key values are not available to put into the Key buffer.
Helen