When attempting to open a DuckDB database for writing that is already open for writing in another process, the DuckDB ODBC driver throws an exception instead of returning SQL_ERROR. This is incorrect as ODBC is a C API, not a C++ API.
To Reproduce
Open a database in the DuckDB command line.
Execute the below program with a DSN of the general form:
Using specified DSN : DRIVER={DuckDB Driver};Database=C:\Users\xxx\experiment1.duckdb
First connect attempt...
Exception {"exception_type":"IO","exception_message":"File is already open in \nC:\\xxx\\AppData\\Local\\Microsoft\\WinGet\\Packages\\DuckDB.cli_Microsoft.Winget.Source_8wekyb3d8bbwe\\duckdb.exe (PID 267636)"} caught on attempted connect.
OS:
Windows 10 Enterprise, x64
DuckDB Version:
0.10.2 and 5/28/2024 bleeding edge
DuckDB Client:
ODBC
Full Name:
Peter Aronson
Affiliation:
Esri
What is the latest build you tested with? If possible, we recommend testing with the latest nightly build.
I have tested with a nightly build
Did you include all relevant data sets for reproducing the issue?
Yes
Did you include all code required to reproduce the issue?
[X] Yes, I have
Did you include all relevant configuration (e.g., CPU architecture, Python version, Linux distribution) to reproduce the issue?
What happens?
When attempting to open a DuckDB database for writing that is already open for writing in another process, the DuckDB ODBC driver throws an exception instead of returning SQL_ERROR. This is incorrect as ODBC is a C API, not a C++ API.
To Reproduce
Open a database in the DuckDB command line.
Execute the below program with a DSN of the general form:
Using the same database.
Program:
Resulting output:
OS:
Windows 10 Enterprise, x64
DuckDB Version:
0.10.2 and 5/28/2024 bleeding edge
DuckDB Client:
ODBC
Full Name:
Peter Aronson
Affiliation:
Esri
What is the latest build you tested with? If possible, we recommend testing with the latest nightly build.
I have tested with a nightly build
Did you include all relevant data sets for reproducing the issue?
Yes
Did you include all code required to reproduce the issue?
Did you include all relevant configuration (e.g., CPU architecture, Python version, Linux distribution) to reproduce the issue?