Subject | Re: [IBO] Trouble posting changes to a multirecord dataset |
---|---|
Author | Lucas Franzen |
Post date | 2006-11-01T19:50:18Z |
Thomas,
myzebuisbrown schrieb:
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.
myzebuisbrown schrieb:
> Hello Again,Simplified or not it's still nonsense fetching and updating data with
>
> 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.
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.