Printable Version of Topic

Click here to view this topic in its original format

UtterAccess Forums _ Access Errors + Error Handling _ Write Conflict - Planning For And Workaround

Posted by: dw85745 Aug 29 2019, 12:30 PM

----------------
Background
-----------------
I use Access strictly as a backend.
Currently I have a VB Program that updates certain Access tables (call them data tables) automatically (mainly on time criteria but time varies).
Also part of this VB program are User Forms which modify properties in other Access Tables (call them User tables).

---------------
Question
---------------
My concern are:
1) Will I get a write conflict from Access if on the odd chance the user tries to Update a User tables at the same time the App tries to write a Data Table?
2) IF so what is the best way to handle this conflict ?
a) Where do I find the error codes for Write errors (assume there are more than one)
b) SHould I process those error codes in the calling program and then attempt to rewrite the record
- or-
c) or is it better to somehow deal with that error within Access itself -- and if so , how?

Posted by: theDBguy Aug 29 2019, 12:40 PM

Hi. Not sure I understand, but you would only get write conflict errors if you're trying to modify data. Otherwise, if you're trying to modify the table structure, you might get an access denied or write permission error instead.

Posted by: dw85745 Aug 29 2019, 01:33 PM

theDBGuy: Thanks for responding.

QUOTE
Not sure I understand, but you would only get write conflict errors if you're trying to modify data.

So since I am writing to two separate tables NO Chance of a conflict or Access saying -- Can't write because writing to other Table?

===========
BTW: Never heard back or saw a post in Forum on info I sent you regarding resolving Access DB corruption ?

Posted by: theDBguy Aug 29 2019, 01:38 PM

Again, write conflicts, to me, means writing data to the same table and same record by (at least) two different users or transactions or processes. Otherwise, then no, you shouldn't get an error.

Posted by: tina t Aug 29 2019, 02:17 PM

QUOTE
Also part of this VB program are User Forms which modify properties in other Access Tables (call them User tables).

i can't imagine why anyone would allow users to modify table properties. but regardless of the business need or purpose, changing the structure of any object in a live database, where other users have current access to the db, is a recipe for corruption.

hth
tina

Posted by: dw85745 Aug 29 2019, 03:39 PM

--------------
theDBGuy
-------------
Thanks. Haven't had a problem to date, just going over some code and want to make sure.

-----------
tinat
-----------
Hi tinat:

QUOTE
i can't imagine why anyone would allow users to modify table properties

If by your statement you mean modifying the table structure, the answer is No and I agree with you.

If however, you mean changing the value of a table property stored in a table, then I disagree.
Depending on the application, each user may want to customize things for themselves
and those values are stored in Access within a table structure.
Not sure how you would do it, but if you have a better solution -- other than an INI or Flat file, I'm all ears.

Posted by: tina t Aug 29 2019, 07:31 PM

storing data is storing data, hon, it doesn't matter what use you're going to put it to. if your users are adding/editing/deleting data in tables, no problem - that's what tables are for. if that data is going to be used to temporarily set various interface properties at runtime, AFAIK that's not a problem, either.

setting object properties and then saving those property settings in the object - that's altering structure. bad idea for a production db, especially a backend db that is shared by other users. altering structure should only be done by the developer, on the development copy of the db.

i think you already got what i said above, and we're on the same page. just restating it for folks, especially newbies, who may read this thread going forward. :)

hth
tina