Union queries and batchoptimistic lock

From: Kovács Ferenc (kovacs_at_quattrosoft.hu)
Date: 02/28/05


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



Relevant Pages

  • Re: Help with Microsoft help on linking Access to Outlook
    ... Tools - references - tick Microsoft Outlook object library. ... in the criteria cell in the graphical query builder. ... the same filtered recordset every time. ... normal form to allow the normal filtering process and viewing of the ...
    (microsoft.public.access.formscoding)
  • Re: Help with Microsoft help on linking Access to Outlook
    ... in the criteria cell in the graphical query builder. ... use as the source in the routine. ... the same filtered recordset every time. ... normal form to allow the normal filtering process and viewing of the ...
    (microsoft.public.access.formscoding)
  • Re: Help with Microsoft help on linking Access to Outlook
    ... and have the query point to the combo box to get its value. ... the same filtered recordset every time. ... choose themselves what fields to filter on. ... Set MyRS = MyDB.OpenRecordset" ...
    (microsoft.public.access.formscoding)
  • Re: Help with Microsoft help on linking Access to Outlook
    ... in the criteria cell in the graphical query builder. ... use as the source in the routine. ... the same filtered recordset every time. ... normal form to allow the normal filtering process and viewing of the ...
    (microsoft.public.access.formscoding)
  • Re: Help with Microsoft help on linking Access to Outlook
    ... in the criteria cell in the graphical query builder. ... use as the source in the routine. ... the same filtered recordset every time. ... choose themselves what fields to filter on. ...
    (microsoft.public.access.formscoding)