CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2000
    Posts
    265

    Mode Property for Connection Object

    When using the mode property of the connection object, what does the word Share mean in some of the enum constants? For example, what does the Share mean in the enum adModeShareDenyRead.

    ENUM Examples:
    adModeReadWrite
    adModeShareDenyNone
    adModeShareDenyRead



  2. #2
    Join Date
    Aug 2000
    Location
    KY
    Posts
    766

    Re: Mode Property for Connection Object

    The mode property indicates the available permission for modifying data.
    adModeUnknown - Permission can not be determined
    adModeRead - read only
    adModeWrite - write permission
    adModeReadWrite - read/write permission
    adModeRecursive - adShare permission applied recursively
    adModeShareDenyRead - Prevents others from opening a connection in read mode
    adModeShareDenyWrite -Prevents others from opening a connection in write mode
    adModeShareExclusive - prevents other from opening a connection
    adModeShareDenyNone - no permissions denied

    -Not all OLE DB providers support all modes




  3. #3
    Join Date
    Aug 2000
    Posts
    265

    Re: Mode Property for Connection Object

    I know what HELP says, but I do not understand these definitions. What does SHARE do for me?


  4. #4
    Join Date
    Aug 2000
    Location
    KY
    Posts
    766

    Re: Mode Property for Connection Object

    you would set the mode property of the connection object under very specific conditions. For Example: You are performing an update to a table that must complete without contention from any other users. In this case you would use the adModeShareDenyWrite to exclude other users from writing to the database until you are finished updating the database. Another Example: You want to compress or copy the database in code, you need to lock all other users out of the database until you are done - adModeShareExclusive. The other use for the mode property is if you have a user that is only supposed to have read permission then use adModeRead to prevent any writes going back to the database


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

Featured