Connect to Access 2016 database through OLEDB
I'm trying to make a simple connection to a microsoft access 2016 database through a vb.net code, it's very simple:
Cn.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:\Data\VBtest\ConnectigToSecuredAccessDB\Production3.accdb; Jet OLEDB:Database Password=aros20;"
The database was encrypted using MS Access 2016, when I run the code I get the following error message:
"An unhandled exception of type 'System.Data.OleDb.OleDbException' occurred in System.Data.dll
Additional information: Cannot open database ''. It may not be a database that your application recognizes, or the file may be corrupt".
When I decrypt the same database and use it with the connection string:
Cn.ConnectionString = "PROVIDER=Microsoft.ACE.OLEDB.12.0;Data Source = D:\Data\VBtest\ConnectigToSecuredAccessDB\Production.accdb"
it works fine which means the database is OK and the problem is in the encryption. What could the problem be? I'm confused.
Encryption of the database is very important and I need it.
Many thanks for your help.
I had the exact same problem: Database working without password protection, OleDbException as soon as I put on a password. Now I'm not exactly sure what I did, suddenly it worked. Installing the 2010 AccessDatabaseEngine might have been the key, but now I'm not able to verify. I hope you find out!
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 was0 votes0 answersTheresa Draper1 month ago
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;1 vote2 answersMark Cykowski3 months ago
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 access0 votes0 answersM'chi3 months ago
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.0 votes1 answerKashif Khan4 months ago
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.0 votes0 answersPete D5 months ago
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=" + strPassword0 votes0 answersSteve Hammock11 months ago
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.0 votes1 answerAnonymous user12 months ago
Passthrough query connstring from Access VBA to Azure SQL works on one PC and not on others!
Hi, We have an Azure SQL database and a local Access app that needs to interact with it. Using VBA-generated pass-through query definitions to grab data as needed, no linked tables and no permanently saved queries.0 votes0 answersMike Noviskieon Jul 24, 2018
What is the Connection string for ACCESS 2007 .mdb on Windows 7 (64-bit)?
I have tried the following variations of the same statement in Powershell 5.1: $objCon.Open("Provider=Microsoft.ACE.OLEDB.12.0; Data Source=C:\MyDocuments\WWW.mdb")0 votes1 answerRamon Tanon Jun 26, 2018
Problem with connecting to an Access 97 db on Linux with Debian7
I have an Acces 97 database working on a Windows 7 PC where I can get data from it by XAMPP with phppdoodbc. I want to have this database on a QNAP NAS with Linux arm5, on Debian9 with a working Apache2 and PHP7, but I cannot get it to work. I now use:0 votes0 answersRoelon Jun 01, 2018
- Load more posts