C# Windows Vista

ennrike

Registered User.
Local time
Yesterday, 18:47
Joined
Dec 3, 2010
Messages
25
Hello,

I have an small application C# that uses an Access2003 file that is in a network folder location. We have been using Windows XP with this application and everything was fine. However, we got new computers with WindowsVista the application runs fine in those computers with Vista, but, time to time those computers with vista tries to open the AccessFile exclusively for that computer, so that, the applications that are from computers (with XP or Vista) cannot open the file because there is an error telling that someone has already open the file exclusively for that computer (we didn't have this problem when we just had only windows XP)
How can I open the Access2003 file from Vista without asking to have exclusively for that computer?

Currently I am using: //-- Update data in AtmoDB ----------------------------------
using (OleDbConnection con = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\TL-DATA1\Data\Dept\PA-ATMO\Restricted\ATMO7_DB\PA_ATMO7_DB.mdb"))
{
con.Open(); //Open Connection
using (OleDbCommand SQLCommand = new OleDbCommand("SQL command", con))
{
int response = SQLCommand.ExecuteNonQuery();
if (response < 0)
{
throw new Exception("SQLCommand.ExecuteNonQuery returned < 1");
}
}
}
 

Users who are viewing this thread

Back
Top Bottom