So I have this aggrivating database that I need this service program to operate against. As a windows forms based app, the exact same code works. The obvious problem was that the service ran as 'SYSTEM' rather than my user ID. I changed the service to run as the same user that was running the forms based app... and it still doesn't work.
The message I get is:
The Microsoft Jet database engine cannot open the file '\\server\database.MDB'. It is already opened exclusively by another user, or you need permission to view its data.
My connection string is:
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\server\database.MDB;Mode=ReadWrite;Jet OLEDB:System database=C:\data\system.mda;Jet OLEDB:Engine Type=5;Jet OLEDB:Database Locking Mode=0;Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk Transactions=1;Jet OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB:SFP=False;User ID=id;password=password;"
Keep in mind that the same connection string works on the forms based application.
Any ideas?