Re: MFC ODBC Consumer

Tech-Archive recommends: Fix windows errors by optimizing your registry




RG wrote:
> I have two inherited MFC Recordset classes that connect to an access db file
> and query the same table. The first class represents the snapshot and the
> second the dynaset. When I perform edit on the second one, the updates are
> registered much later after the Update method was run. Hence the first
> class can't see the latest updates even if recordset is closed and opened or
> requeried.
>
> Would anyone know why this is happening and how I could get around it?
>

A snapshot is as the name implies: it shows the data at the time it was
fetched. A dynaset willl reflect changes made elsewhere (e.g. by others
in a multi-user system) but a snapshot won't.

You can get round it by converting the first recordset to a dynaset
(assuming that you require both sets), only use the dynaset, or Requery
the snapshot after every update by the dynaset.

Hope that's useful.

Paul.

.



Relevant Pages

  • RE: Deleting a record deletes item from combo boxs underlying tab
    ... source of the problem was the Dynaset (Inconsistent Updates). ... made that selection because the query was uneditable. ... RecordSource Dynaset, the problem went away. ... The forms recordset type is Dynaset ...
    (microsoft.public.access.formscoding)
  • Re: Recordset Type Issue
    ... different recordset type. ... If the recordset is set to dynaset, allow additions is yes, allow edits is ... >> populates the users information form with their information. ...
    (microsoft.public.access.forms)
  • Re: multiple tables in one query
    ... by changing the Recordset to Dynaset(Inconsistent ... Updates); however, it only seems to save the information ... If I try to put in the RecNo. ... >result in a non updateable query. ...
    (microsoft.public.access.queries)
  • Re: Database has gigantic size
    ... > reopen the recordset a few dozen times, but 1000 updates and a few ... If you don't do queries, where does your 'rs' come from? ... > is getting orphaned inside the database for some unfathomable reason. ... your recordset by an unindexed field, the DB has to do work (which uses ...
    (microsoft.public.vb.database)
  • Re: Effects on RST in Calling Proc
    ... >> Obviously, the snapshot avoids that, but I think it's better to ... the recordset is snapshot and is passed to ... > the called proc so that another field can be searched for a value ... you avoid the issue entirely. ...
    (comp.databases.ms-access)