Here's my daily question for you geniuses
What is the prefered method of saving records in a multi-user environment?
My project is nearing completion, and I've begun to turn my attention to recordlocking, and the methods with which I am saving records in general. Currently my code is riddled with random record saving code ranging from running stored querydef's from CurrentDB to using docmd.runsql() to run dynamically created action queries, and everything in between. I'm sure the correct method of running these queries is a little more involved than what I've been doing, and I'd like to begin converting my code. So what's the best way to perform these record saving operations? Keep in mind the following:
1) This is a multi-user fe/be split database
2) I don't want that annoying access dialog box to pop up that informs the user that they're "Permanently changing (x) number of rows."
3) I have no idea how I'm going to handle recordlocking yet. However, I've been assured that there will not likely be more than two or three people with the same table open for writing purposes at the same time.
In addition, the way my application is structured, I have no forms based on queries or tables. Any operations that are performed on existing record's are done by returning recordsets to be used within the code--I have found this to be a much more flexible approach with respect to ensuring the integrity of data that is exposed to user modification, among other things. With this in mind, is there a record locking technique that will allow me to lock a specific record only, or do I need to lock the entire table while a user is working with data within it?
On a related note: Setting asside the obvious 'good programming' practices, does access automatically clean up hanging objects and open tables/recordsets at the end of a routine or code-block where the object is locally/privately defined? Or must you manually clean things up?
Thanks in advance folks,
Sam
What is the prefered method of saving records in a multi-user environment?
My project is nearing completion, and I've begun to turn my attention to recordlocking, and the methods with which I am saving records in general. Currently my code is riddled with random record saving code ranging from running stored querydef's from CurrentDB to using docmd.runsql() to run dynamically created action queries, and everything in between. I'm sure the correct method of running these queries is a little more involved than what I've been doing, and I'd like to begin converting my code. So what's the best way to perform these record saving operations? Keep in mind the following:
1) This is a multi-user fe/be split database
2) I don't want that annoying access dialog box to pop up that informs the user that they're "Permanently changing (x) number of rows."
3) I have no idea how I'm going to handle recordlocking yet. However, I've been assured that there will not likely be more than two or three people with the same table open for writing purposes at the same time.
In addition, the way my application is structured, I have no forms based on queries or tables. Any operations that are performed on existing record's are done by returning recordsets to be used within the code--I have found this to be a much more flexible approach with respect to ensuring the integrity of data that is exposed to user modification, among other things. With this in mind, is there a record locking technique that will allow me to lock a specific record only, or do I need to lock the entire table while a user is working with data within it?
On a related note: Setting asside the obvious 'good programming' practices, does access automatically clean up hanging objects and open tables/recordsets at the end of a routine or code-block where the object is locally/privately defined? Or must you manually clean things up?
Thanks in advance folks,
Sam