Click here to Skip to main content
15,907,329 members
Home / Discussions / C#
   

C#

 
AnswerRe: VS2008 and Updating controls ? Pin
Not Active22-Dec-08 10:14
mentorNot Active22-Dec-08 10:14 
GeneralRe: VS2008 and Updating controls ? Pin
Mike Bluett24-Dec-08 7:07
Mike Bluett24-Dec-08 7:07 
GeneralRe: VS2008 and Updating controls ? Pin
Not Active24-Dec-08 8:16
mentorNot Active24-Dec-08 8:16 
GeneralRe: VS2008 and Updating controls ? Pin
Mike Bluett24-Dec-08 9:10
Mike Bluett24-Dec-08 9:10 
GeneralRe: VS2008 and Updating controls ? Pin
Not Active24-Dec-08 9:46
mentorNot Active24-Dec-08 9:46 
GeneralRe: VS2008 and Updating controls ? Pin
Mike Bluett24-Dec-08 9:57
Mike Bluett24-Dec-08 9:57 
AnswerRe: VS2008 and Updating controls ? Pin
Dragonfly_Lee22-Dec-08 21:19
Dragonfly_Lee22-Dec-08 21:19 
GeneralRe: VS2008 and Updating controls ? Pin
Mike Bluett23-Dec-08 10:32
Mike Bluett23-Dec-08 10:32 
GeneralRe: VS2008 and Updating controls ? Pin
Dragonfly_Lee23-Dec-08 21:10
Dragonfly_Lee23-Dec-08 21:10 
GeneralRe: VS2008 and Updating controls ? Pin
Mike Bluett24-Dec-08 7:05
Mike Bluett24-Dec-08 7:05 
GeneralRe: VS2008 and Updating controls ? Pin
Not Active24-Dec-08 8:11
mentorNot Active24-Dec-08 8:11 
AnswerRe: VS2008 and Updating controls ? Pin
Mike Bluett24-Dec-08 14:12
Mike Bluett24-Dec-08 14:12 
QuestionNeed Help in How to hook and re-route the c# function calls Pin
venkatcontact22-Dec-08 8:27
venkatcontact22-Dec-08 8:27 
AnswerRe: Need Help in How to hook and re-route the c# function calls Pin
Not Active22-Dec-08 10:10
mentorNot Active22-Dec-08 10:10 
QuestionSpecify entire app.config at runtime Pin
Chazzysb22-Dec-08 5:00
Chazzysb22-Dec-08 5:00 
AnswerRe: Specify entire app.config at runtime Pin
Not Active22-Dec-08 10:07
mentorNot Active22-Dec-08 10:07 
Question.NET 2.0 Windows Service Deployment error on Windows 2008 server. Pin
Member 357347622-Dec-08 4:22
Member 357347622-Dec-08 4:22 
QuestionWriting to an Access DB locks DB Pin
Planker22-Dec-08 3:49
Planker22-Dec-08 3:49 
AnswerRe: Writing to an Access DB locks DB Pin
Dave Kreskowiak22-Dec-08 4:39
mveDave Kreskowiak22-Dec-08 4:39 
GeneralRe: Writing to an Access DB locks DB Pin
Planker22-Dec-08 5:01
Planker22-Dec-08 5:01 
AnswerRe: Writing to an Access DB locks DB Pin
Wendelius22-Dec-08 8:22
mentorWendelius22-Dec-08 8:22 
GeneralRe: Writing to an Access DB locks DB Pin
Dave Kreskowiak22-Dec-08 8:44
mveDave Kreskowiak22-Dec-08 8:44 
GeneralRe: Writing to an Access DB locks DB Pin
Wendelius22-Dec-08 9:31
mentorWendelius22-Dec-08 9:31 
Dave Kreskowiak wrote:
explanation was that he couldn't open the database in Access and still have database writes be made by his application.


I understood that and I got the feeling that the first connection to the db (his application) opens it in exclusive mode for some reason.

Perhaps I'm still missing something, but I made a test with a fresh db with only 1 table (Table1) where I tried to simulate the problem:
System.Data.OleDb.OleDbConnection connection = new System.Data.OleDb.OleDbConnection();
connection.ConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data source=C:\...\db1.mdb";
connection.Open();
System.Data.OleDb.OleDbCommand command = connection.CreateCommand();
System.Data.OleDb.OleDbTransaction transaction = connection.BeginTransaction();
command.Transaction = transaction;
command.CommandText = "INSERT INTO Table1 (Field1) VALUES ('A')";
command.ExecuteNonQuery();
command.CommandText = "INSERT INTO Table1 (Field1) VALUES ('B')";
command.ExecuteNonQuery();
// Breakpoint here
transaction.Commit();


Before the commit I stopped the debugger. While still in debug mode I opened the mdb file from Access 2003 UI and then opened Table1. Didn't see the rows A and B as expected but all the previous rows where present. When I went through the commit and then re-opened Table1 rows A and B were present.

So all the time I was able to for example query the table. Also I was able to modify data in another table while transaction from C# was in action. Didn't try to update the same table since I suspect that when using defaults, page level locking is used.

The need to optimize rises from a bad design.My articles[^]

QuestionHow to make Efficient algorithm Pin
wasimsharp22-Dec-08 3:44
wasimsharp22-Dec-08 3:44 
AnswerRe: How to make Efficient algorithm Pin
Pete O'Hanlon22-Dec-08 4:36
mvePete O'Hanlon22-Dec-08 4:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.