-
Hi all! I've got a situation where my info is being saved from ADO 2.5 into a .adtg file. My question is what happens if several(say 10) people who are using the VB app try to read this file at the same time using the following code:
FilePath = C:\TestDirectory\Test1.adtg
rsTest.Open Source:=FilePath, Options:=adCmdFile
Will VB break down with an error if too many people try to read the file at once? Or can several people copy the contents of the file into their local recordset(ie rsTest) without any problems? What kind of error-trapping(if any) could I use to prevent any problems? Thanks for ANY ideas!
thomas
-
I'm fairly new to this but it has to do with the Locktype property of the recordset. For instance, if your Cursorlocation property is set to a client-side cursor (adUseClient) then the locktype defaults to Optimistic locking. That means that the file is not locked until updates are actually applied. If you're using a ServerSide cursor, you can use any of the available locktypes. Pessimistic is preferred here because you have less chance of strange things happening if multiple users access the same file. Pessimistic locking ensures that the 1st one to the record gets to lock it down. Anyone else trying to access the record may get an error message. Hope this helps. I would check out the MSDN documentation on Locktype property of ado recordsets to confirm what I've said.