Results 1 to 2 of 2

Thread: Can multiple users open an .adtg file?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 1999
    Location
    Austin,TX,USA
    Posts
    98
    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

  2. #2
    Hyperactive Member
    Join Date
    Sep 2000
    Location
    Tennessee
    Posts
    279
    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.
    A cynic knows the price of everything but the value of nothing.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width