Subject Re: [IBO] Trouble posting changes to a multirecord dataset
Author myzebuisbrown
--- In IBObjects@yahoogroups.com, Lucas Franzen <luc@...> wrote:
>
>
> Thomas,
>
>
> myzebuisbrown schrieb:
>
> > Hello Again,
> >
> > I didn't do a very good job of explaining my problem. The code I
> > attached is actually some vastly simplified test code. Typically the
> > records would have about 12 fields being modified with about half of
> > them different on each record. So this is the reason why a simple
> > update query won't do the job.
>
> Simplified or not it's still nonsense fetching and updating data with
> one Cursor.
>
> Either write a general statement that's valid for all records in your
> result set (as you select it with yourt cursor) or - if that's not the
> case and you have to work on some data the cursor's returning let a
> Cursor fetch the records and update the record with a second (DSQL)
> statement.
> You still can decide which param's set to which value. If a field
> shouldn't be updated set it to the current cursor value, if not do
> whatever you want.
> Do a commit after everything's updated or - if you want to commit in
> between - set the cursor to another transaction than your DSQL, so it
> won't close by the transactions commit.
> Furtheron set the cursor to ReadOnly and RequestLive to FALSE.
>
> That's the fast and the general way to go.
>
> Luc.
>

Thanks Luc.

Using Readonly and RequestLive has certainly made things load a lot
faster.

I found out the problem I initially posted was being caused by a join
in the sql of the cursor. But my idea didn't really make things much
faster so I'll try using a DSQL component instead of a cursor. Often
the application needs to update about 40 fields per record, is DSQL
still the way to go??

Cheers,
Thomas