Search notes:

OLE DB Provider for Microsoft Access database engine: Connection string

Provider

An connection string for the Microsoft Access database engine OLE DB provider needs to have the Provider key with a value of one of

Data Source

The second required key is Data Source. Its value is a file system path that locates the data source that is accessed through through the provider.
By default, Data Source names an MS Access database file (*.accdb).
If the specified another document format (such as Excel etc.), the connection string also requires a key-less value to identify the document format. The possible values are found in the registry under the key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\14.0\Access Connectivity Engine\ISAM Formats
The following connection string refers to an Access database:
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=P:\ath\to\access\db.accdb
The following connection string refers to a (macro-less, that is *.xlsx) Excel worksheet. Note the necessary Excel 12.0 right after the Provider=…; part.
The connection string also requires to specifiy if the data contains a header (HDR=Yes):
Provider=Microsoft.ACE.OLEDB.12.0;Excel 12.0 Xml;Data Source=P:\ath\to\excel\worksheet.xlsx;HDR=Yes

TODO

IMEX

The extended attribute IMEX (seen for a connection to Excel) stands for Import-Export Module and can probably be set to apparently be set to 0, 1 or 2.
As per this website, setting IMEX to 1 tells the driver to read all («intermixed»?) columns as text.
This website also claims that setting IMEX to 0 forces TypeGuessRows=0.
When set to 1 or 2, a Workbook cannot be created.

See also

General notes about Connection strings in OLE-DB

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1737228862, '3.133.155.48', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/databases/OLE-DB/provider/Microsoft-Access-database-engine/connection-string(82): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78