Union queries and batchoptimistic lock
From: Kovács Ferenc (kovacs_at_quattrosoft.hu)
Date: 02/28/05
- Next message: Gil Yoktan: "ADO XBase dBase III with hebrew"
- Previous message: jason: "Re: Not enough Parameters?"
- Next in thread: Kovács Ferenc: "Re: Union queries and batchoptimistic lock"
- Reply: Kovács Ferenc: "Re: Union queries and batchoptimistic lock"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 28 Feb 2005 10:24:49 +0100
Hi!
I am using client side cursors and batchoptmistic locks in my browser
windows (lists). Whenewer I edit a record I use another dataset object
(with a very simple SQL inside) to commit the changes and then I modify
the record in question in the original, batchoptimistic dataset however
without saying batchupdate. (Actually I never do that, all my changes
remain the clientside as far as the list window is concerned until the
query is refreshed). This way I can achive that the result complex
queries is visualized in a grid but still you can post changes towards
your DB without the ADO complaining about different join-s making it
incapable of updating the data. Also using it I am able to visualize
ambigous data (meaning rows that would be dropped by a query search
criteria otherwise.)
My problem is that posting a change into a union-type query (eg.
'(select 1 from TABLE) union all (select 2 from TABLE)') will have no
results because the resync method is called during the Post operation.
Actually I tried to omit the resync with different tricks in a dataset
desendant however the first sort operation will call it again, which
mean that all my (non-batched) changes will be lost from memory.
Investigating the CustomADODataSet code I've found that the
internalrefresh procedure (in which I could change the ADO Recordset
resync call to 'adResyncAllValues') is seldom called (only from
refresh). Instead during the resync getRecord is used and some kind of
buffer operation - actually I didn't have enough time (and patience) to
look into it more througfuly.
So my questions are the following:
1. Is there a way to append one recordset to another (and via this way
omitting the 'union all' query structure)
2. Is there a way to correctly post a change into a batchoptmistic
locked, 'union all' like query (without batching it), perhaps using its
own recordset object.
Any (and I mean any) help would be highly appreciated:
Kovacs Ferenc
- Next message: Gil Yoktan: "ADO XBase dBase III with hebrew"
- Previous message: jason: "Re: Not enough Parameters?"
- Next in thread: Kovács Ferenc: "Re: Union queries and batchoptimistic lock"
- Reply: Kovács Ferenc: "Re: Union queries and batchoptimistic lock"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|