Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

diffrence between dynaset (0) <- default and dynaset (1) inconsistent updating ?

Posted on 2002-07-09
2
1,317 Views
Last Modified: 2008-02-01
Hi there,

i had this little database where i had table articles now the type of the recordset was always set to dynaset (0), the default value. Now today i added a new table named options where i would save some values in like for example the course of the euro wich i could then use to calculate automaticly how much the prize in Belgian francs would be using the the value in the table options. Now this table (options) aint got any relation to the table articles (i aint goana put for each article what eurocourse to take since it's always the same) and since the moment i added the table to some of my queries for the recordsource i couldn't change any values anymore unless i change the type of recordset to dynaset (1) inconsistent updating i could change the data again.

But i'm not quite sure why i had to do this and what effect this have on the whole db, i mean is it ok that i changed and won't i get any troubles later on ? the help file didn't explain me much
thanks
0
Comment
Question by:joyrider
2 Comments
 
LVL 5

Accepted Solution

by:
TheMek earned 25 total points
ID: 7140407
Hi Joyrider,

can't really say much about it, but I found this info about inconsistent updates:
Inconsistent Updates
Dynaset-type Recordset objects can be based on a multiple-table query containing tables with a one-to-many relationship. For example, suppose you want to create a multiple-table query that combines fields from the Orders and Order Details tables. Generally speaking, you can’t change values in the Orders table because it’s on the “one” side of the relationship. Depending on your application, however, you may want to be able to make changes to the Orders table. To make it possible to freely change the values on the “one” side of a one-to-many relationship, use the dbInconsistent constant of the OpenRecordset method to create an inconsistent dynaset. For example:

Set rstTotalSales = dbs.OpenRecordset("Sales Totals" ,, _ dbInconsistent)

When you update an inconsistent dynaset, you can easily destroy the referential integrity of the data in the dynaset. You must take care to understand how the data is related across the one-to-many relationship and to update the values on both sides in a way that preserves data integrity.

The dbInconsistent constant is available only for dynaset-type Recordset objects. It’s ignored for table-, snapshot-, and forward-only-type Recordset objects, but no compile or run-time error is returned if the dbInconsistent constant is used with those types of Recordset objects.

Even with an inconsistent Recordset, some fields may not be updatable. For example, you can’t change the value of an AutoNumber field, and a Recordset based on certain linked tables may not be updatable.


On the other hand, you might consider storing the exchange rate as a 'global' variable in your application. Make a function around this constant to be able to use it in your queries. That way you won't have to use a separate table in your query. In a global module put:

Private Const cEuro As Double = 2.20371 'put your exchange rate here
Public Function ExchRate() As Double
  ExchRate = cEuro
End Function

Hope this helps,
  Erwin
0
 

Author Comment

by:joyrider
ID: 7140422
hmm so it is possible thatr i can destroy the whole thing then hmm, at first i did it using dlookup but that was slow, and the reason i've put it in a table was so that the user could change the rate in case it would change wich is possible with money values. So making it a global constant won't let user change the value for the course of the euro.

i've tested some it a bit with the inconsistent dynaset and it seems it doesn't screw things so i'll keep it like that, thanks for ure answer !
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question