![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
How do I lock tables so that a series of SQL statements will get current and consistent data (that is, no updates while the series is executing)? I am having to bolt on multi-user use to my app when single-user was a basic spec. Sincerely, Gene Wirchenko |
#3
| |||
| |||
|
|
How do I lock tables so that a series of SQL statements will get current and consistent data (that is, no updates while the series is executing)? I am having to bolt on multi-user use to my app when single-user was a basic spec. Sincerely, Gene Wirchenko |
#4
| |||
| |||
|
|
How do I lock tables so that a series of SQL statements will get current and consistent data (that is, no updates while the series is executing)? I am having to bolt on multi-user use to my app when single-user was a basic spec. Sincerely, Gene Wirchenko |
#5
| |||
| |||
|
|
Gene Wirchenko wrote: How do I lock tables so that a series of SQL statements will get current and consistent data (that is, no updates while the series is executing)? I am having to bolt on multi-user use to my app when single-user was a basic spec. Are you using VFP data on the backend or client server? |
|
If client server, what server is on the backend? |
#6
| |||
| |||
|
|
Gene Wirchenko wrote: How do I lock tables so that a series of SQL statements will get current and consistent data (that is, no updates while the series is executing)? I am having to bolt on multi-user use to my app when single-user was a basic spec. This *could* be a really bad idea, depending on how long "the series" takes. Just wanted to get that little warning out of the way first. It's one of those "always there" things that always needs to be mentioned. <s |
|
You might be surprised how multi-user friendly VFP is without your having to do a thing. Implicit locking handles a lot more than you might think. |
|
However, for your "series" you could always explicitly FLOCK() the tables involved. That will keep updates/inserts out for the duration. Of course, back to the first paragraph, your update/insert routines have to be written to handle situations where they might happen during your "series". |
#7
| |||
| |||
|
|
On Tue, 20 Sep 2005 22:16:42 -0400, Eugene Vtial <news (AT) microsoft (DOT) com wrote: Gene Wirchenko wrote: How do I lock tables so that a series of SQL statements will get current and consistent data (that is, no updates while the series is executing)? I am having to bolt on multi-user use to my app when single-user was a basic spec. Are you using VFP data on the backend or client server? No, I am not. |
#8
| |||
| |||
|
|
You might be surprised how multi-user friendly VFP is without your having to do a thing. Implicit locking handles a lot more than you might think. But does it handle in between two SQL statements? Not everything can be done in ONE SQL statement. I think, if you can't use transactions, then the only reliable method is using |
![]() |
| Thread Tools | |
| Display Modes | |
| |