Administrator

Administrator

  • Tech Writer
  • 2.2k
  • 1.5m

Exclusive connection mode with Access not working!

Apr 13 2003 12:39 PM
Hi all, I am trying to do what I believe is a very simple thing: to open a connection to a database in exclusive mode (that is, to implement pesimistic concurrency, I don´t want anybody else doing updates while I do mine). Well, in the connectionString I use in the OleDbConnection object (I am connecting to an Access DB) I try to set the mode to ReadWrite|Share Deny Write, or many other variations, but I can´t seem to make it work, I get undocumented OleDbException when I try to open the connection. In particular: "No error information available: DB_E_ERRORSOCCURRED(0x80040E21)." All that seems to work which includes any of the Share Deny options is the Share Deny None... which, of course, does not serve my purposes since it does not deny any sharing :-) Does anyone have any experience with using the access mode when opening connections in ADO.NET? Thanks in advance!