I'm developing a C# .NET 4.0 program that occasionally executes an insert query into an Access database on a network location with Microsoft.ACE.OLEDB.12.0. This program will be used by as many as 200 people simultaneously, which I think could lead to multiple insert queries executing at the exact same time.
Would there be an exception if multiple insert queries were executed at the exact same time? I'm thinking if there is an exception, I could make the code try it again once, so that a few milliseconds later it might not try inserting simultaneously. So the second question is, what exception would I look for to indicate multiple queries were executed at the exact same time?
//one of several queries that may be executed by the program
//access 2010 database on network location, Microsoft.ACE.OLEDB.12.0
using (OleDbConnection connection = new OleDbConnection(globals.logAccessConn))
{
connection.Open();
string sqlText = "INSERT INTO log ... "
OleDbCommand command = new OleDbCommand(sqlText, connection);
command.Parameters.AddWithValue(...);
command.ExecuteNonQuery();
connection.Close();
}
sorry if this is a duplicate - i tried searching.