Read Only connection to Access DB throws error: Could not lock file
I'm writing a Web Application that reads from an Access Database. This DataBase is written to through another Jet.OLEDB.4.0 connection from some other device I do not control. Now I was said that my web application had blocked the writing process and therefore data had been lost.
In order to make my connection really read-only I added the "Mode=Read"- portion in the connection string. This worked perfect while building/debugging my solution in VisualStudio. BUT: After deploying it to the site I get the error.
System.Data.OleDb.OleDbException: Could not lock file.
Any suggestions?
This is my connection string:
OleDbConnection con = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\ESSBP1S0703\Laboratorio\Programas\UNICERT\files\Zeugnis.mdb;User Id=admin;Password=;Mode=Read;")
0 answers
Post an answer but please log in first
Similar Questions
Connection to Access DB not working on new 2016 server.
Corporation updated my server and i started getting this error (provided from the server team): GET, /page/pages/MarketMatrix-2.asp, |236|800a0e7a|Provider_cannot_be_found._It_may_not_be_properly_installed.,
Assist with AHK to send / receive queries to MSAccess
Has or does anybody have information about working in "AHK" "Auto Hotkey" and connecting to an access database? Have found this link: https://github.com/IsNull/ahkDBA
connections not work in php
I am trying to connect an access 97 database from php, I have tried three ways methods and none works for me: $db = 'c:/VENTAS.MDB'; $odbcname = "ventas_dsn_sistema";
Connection String Not Working
I am new to SQL Connection strings. We recently migrated from SQL Server 2008 32 bit to SQL Server 2017 64 bit. The database I am using is an Access 2010 32 bit and we upgraded to Access 2013 32 bit. I believe the connection string that was being used for SQL Server 2008 32 bit was
Need connection string for Office 2019
I wrote a VB .NET program using VS17 that opens Excel files and loads the data into an Access database. For .xls files, I use the connection string: Provider=Microsoft.ACE.OLEDB.12.0;Data Source= ...;Extended Properties Excel 8.0;
Macro ne fonctionnent pas avec le runtime access
Bonjour et merci voici mon besoin j'ai un fichier excel qui me permet de gere mes contact depuis un userform dans le quel il y a des textbox et une combobox qui a pour base une table access
Excel VBA ERROR ODBC connection failed
Hi, it is working in Excel-32 bit version, but not working in excel-64 bit. I have a linked table in ms-access which is linked to a sql server table, and when I am trying to fetch the data in excel via VBA from ms-access linked table the error message "ODBC connection failed" showing.
Interbase ODBC to Access with foreign characters
I have a legacy Delphi database, with an application written in Borland Pascal. It's an old system, running on a virtual XP box, since it won't run on anything newer.
User Supplied OLEDB Password
Is it possible to supply a database password that is let's say supplied when the user logs into the website. Example "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Users\MyName\Documents\mywebsite_assets\database\database.mdb; Jet OLEDB:Database Password=" + strPassword
Simplest way to get ADO.NET conection string for mdb database
I'm learning ADO.NET and have been stuck for DAYS trying to get a connection string for a plain, vanilla .mdb database. I've been trying potential connection strings and permutations from this site but NOTHING works; the database connection is never opened.
- Load more posts