Connect ODBC without driver installed


Jaskmar

Is it possible to make an ODBC connection without installing a system level driver? Can I just point to the DLL containing the driver?

I'm using it in 32bit C++, currently testing it on Windows, connecting to a Firebird database. I have tried the following connection strings, but that doesn't work :

constexpr auto DatabaseConnection =
//"DRIVER=Firebird/InterBase(r) driver;" //this works when driver installed
"UID=SYSDBA;"
"PWD=masterkey;"
"DBNAME=C:\\some\\path\\to\\database\\DB.FDB;"
"Client=C:\\Windows\\System32\\OdbcFb.dll;";

Error message:[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

Jaskmar

The Firebird ODBC driver contains a small static library (named ) that OdbcFb.libshould be linked within the application . Under the hood, it probably preloads the dll and somehow registers it as a new driver. When linking such libraries, valid connection strings are:

"DRIVER=OdbcFb.dll;UID=SYSDBA;PWD=masterkey;DBNAME=127.0.0.1:C:\\path\\DB.GDB;";

To my surprise it also works when you omit DRIVER, by using some magic to select the appropriate driver:

"UID=SYSDBA;PWD=masterkey;DBNAME=127.0.0.1:C:\\path\\DB.GDB;";

Notice:

  • must be OdbcFb.dllvisible for your application (in the same directory or system PATH)
  • It should be known to choose the appropriate library architecture, i.e. 32-bit or 64-bit.

Related


Connect ODBC without driver installed

Jaskmar Is it possible to make an ODBC connection without installing a system level driver? Can I just point to the DLL containing the driver? I'm using it in 32bit C++, currently testing it on Windows, connecting to a Firebird database. I have tried the follo

Connect SAS to mongodb without ODBC

previous One of our statisticians is stuck trying to read data from mongoDB using SAS. In my experience connecting mongo to other languages always requires the use of native drivers, but in this case I have found that it is only possible to use ODBC. I'm tryin

Connect SAS to mongodb without ODBC

previous One of our statisticians is stuck trying to read data from mongoDB using SAS. In my experience, connecting mongo to other languages always requires using native drivers, but in this case I found that only using ODBC is possible. I'm trying to find a b

Qt connect to XLSX file using ODBC driver

motto I have code taken from Qt Wiki: QSqlDatabase db = QSqlDatabase::addDatabase("QODBC"); db.setDatabaseName("DRIVER={Microsoft Excel Driver (*.xls)};DBQ=" + QString("sht.xlsx")); if(db.open()) { QSqlQuery query("select * from [" + QString("Sheet1") + "$

Qt connect to XLSX file using ODBC driver

motto I have code taken from Qt Wiki: QSqlDatabase db = QSqlDatabase::addDatabase("QODBC"); db.setDatabaseName("DRIVER={Microsoft Excel Driver (*.xls)};DBQ=" + QString("sht.xlsx")); if(db.open()) { QSqlQuery query("select * from [" + QString("Sheet1") + "$

Qt connect to XLSX file using ODBC driver

motto I have code taken from Qt Wiki: QSqlDatabase db = QSqlDatabase::addDatabase("QODBC"); db.setDatabaseName("DRIVER={Microsoft Excel Driver (*.xls)};DBQ=" + QString("sht.xlsx")); if(db.open()) { QSqlQuery query("select * from [" + QString("Sheet1") + "$

Connect to external database using ODBC driver in Azure

Dan Rex I work for a company in New Zealand. Currently, we use a remote server (Plexus) to store large amounts of data (>2 billion rows for some tables). We've started using SharePoint routing, and I've created many databases and applications in SharePoint tha

Connect to external database using ODBC driver in Azure

Dan Rex I work for a company in New Zealand. Currently, we use a remote server (Plexus) to store large amounts of data (>2 billion rows for some tables). We've started using SharePoint routing, and I've created many databases and applications in SharePoint tha

Connect to MySQL using ODBC driver in PHP code

Kostya Cherno I have a simple code that selects data using MySQl and PHP. here is: <?php require_once 'login.php' ; $db_server = mysql_connect($db_hostname, $db_username, $db_password); if (!$db_server) die ("Unable to connect to MySQL: " . mysql_error()); m

Qt connect to XLSX file using ODBC driver

motto I have code taken from Qt Wiki: QSqlDatabase db = QSqlDatabase::addDatabase("QODBC"); db.setDatabaseName("DRIVER={Microsoft Excel Driver (*.xls)};DBQ=" + QString("sht.xlsx")); if(db.open()) { QSqlQuery query("select * from [" + QString("Sheet1") + "$

Qt connect to XLSX file using ODBC driver

motto I have code taken from Qt Wiki: QSqlDatabase db = QSqlDatabase::addDatabase("QODBC"); db.setDatabaseName("DRIVER={Microsoft Excel Driver (*.xls)};DBQ=" + QString("sht.xlsx")); if(db.open()) { QSqlQuery query("select * from [" + QString("Sheet1") + "$

Connect to external database using ODBC driver in Azure

Dan Rex I work for a company in New Zealand. Currently, we use a remote server (Plexus) to store large amounts of data (>2 billion rows for some tables). We've started using SharePoint routing, and I've created many databases and applications in SharePoint tha

Connect to external database using ODBC driver in Azure

Dan Rex I work for a company in New Zealand. Currently, we use a remote server (Plexus) to store large amounts of data (>2 billion rows for some tables). We've started using SharePoint routing, and I've created many databases and applications in SharePoint tha

ODBC xlsx driver connection string without headers

Wilzerbert I am using the following command to connect to an xlsx file via ODBC : "DRIVER=Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb);HDR=YES;IMEX=1;READONLY=TRUE;DBQ=C:\Temp\test.xlsx" It works fine, but when there is no header in the file, I alwa

Install ODBC driver on Travis without sudo

mood I try to use the new container based infrastructure on Travis. But I have a problem with installing the ODBC driver. Now, I'm going to use sudoit. sudo: required addons: apt: packages: - unixodbc - unixodbc-dev - libmyodbc before

Install ODBC driver on Travis without sudo

mood I try to use the new container based infrastructure on Travis. But I have a problem with installing the ODBC driver. Now, I'm going to use sudoit. sudo: required addons: apt: packages: - unixodbc - unixodbc-dev - libmyodbc before

ODBC xlsx driver connection string without headers

Wilzerbert I am using the following command to connect to an xlsx file via ODBC : "DRIVER=Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb);HDR=YES;IMEX=1;READONLY=TRUE;DBQ=C:\Temp\test.xlsx" It works fine, but when there is no header in the file, I alwa

ODBC xlsx driver connection string without headers

Wilzerbert I am using the following command to connect to an xlsx file via ODBC : "DRIVER=Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb);HDR=YES;IMEX=1;READONLY=TRUE;DBQ=C:\Temp\test.xlsx" It works fine, but when there is no header in the file, I alwa

ODBC xlsx driver connection string without headers

Wilzerbert I am using the following command to connect to an xlsx file via ODBC : "DRIVER=Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb);HDR=YES;IMEX=1;READONLY=TRUE;DBQ=C:\Temp\test.xlsx" It works fine, but when there is no header in the file, I alwa

Install ODBC driver on Travis without sudo

mood I try to use the new container based infrastructure on Travis. But I have a problem with installing the ODBC driver. Now, I'm going to use sudoit. sudo: required addons: apt: packages: - unixodbc - unixodbc-dev - libmyodbc before

ODBC xlsx driver connection string without headers

Wilzerbert I am using the following command to connect to an xlsx file via ODBC : "DRIVER=Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb);HDR=YES;IMEX=1;READONLY=TRUE;DBQ=C:\Temp\test.xlsx" It works fine, but when there is no header in the file, I alwa

ODBC xlsx driver connection string without headers

Wilzerbert I am using the following command to connect to an xlsx file via ODBC : "DRIVER=Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb);HDR=YES;IMEX=1;READONLY=TRUE;DBQ=C:\Temp\test.xlsx" It works fine, but when there is no header in the file, I alwa

ODBC xlsx driver connection string without headers

Wilzerbert I am using the following command to connect to an xlsx file via ODBC : "DRIVER=Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb);HDR=YES;IMEX=1;READONLY=TRUE;DBQ=C:\Temp\test.xlsx" It works fine, but when there is no header in the file, I alwa

Add a Z/OS license to the ODBC Cli driver installed on the cloud

Andre I deployed a PHP Cloud Foundry application using a PHP buildpack. This buildpack has an ODBC Cli extension so I can use DB2 functions and connect to DB2 on the cloud. But I can't connect to the Z/OS DB2 database through Secure Gateway because I get a lic

Can FireDac connect to SQL Server without ODBC?

Rex Bloom I'm using RAD Studio XE8, C++Builder, FireDac on Windows 8.1. I am connecting to SQL Server 2012 on a virtual machine on the network. I'm using ODBC when I connect the FireDac. This is the driver signature reported by FireDac. [FireDAC][Phys][ODBC][M