SlideShare a Scribd company logo
3
Most read
7
Most read
8
Most read
Qt is Cute!
Qt is Cute!
Usage Note of
Qt ODBC
Database Access
On Linux
William.L
wiliwe@gmail.com
2015-10-05
Qt is Cute!
Qt is Cute!
Index
What is ODBC? ............................................................................................................................................................ 3
Environment................................................................................................................................................................ 4
Install unixODBC Driver/Library/Tool......................................................................................................................... 5
Install MS SQL Server ODBC Driver/Tool.................................................................................................................... 9
Install Qt ODBC SQL Driver Plugin ............................................................................................................................ 13
Creating an ODBC Data Source Name (DSN) for Linux............................................................................................. 16
unixODBC GUI Configuring Tool........................................................................................................................ 19
Qt SQL Programming................................................................................................................................................. 20
Reference................................................................................................................................................................... 23
Qt is Cute!
Qt is Cute!
What is ODBC?
ODBC is the acronym for Open DataBase Connectivity, a Microsoft Universal Data Access standard that started
life as the Windows implementation of the X/Open SQL Call Level Interface specification.
Since its inception in 1992 it has rapidly become the industry standard interface for developing database
independent applications.
Example codes using Qt Core SQL library and relavant reference for this documentation could be downloaded
from the GitHub:
https://github.com/wiliwe/qt-sql-odbc-prog-example
Qt is Cute!
Qt is Cute!
Environment
* Linux CentOS 6.5 64-bit (upgraded to 6.7)
* Qt v5.4.1
* Qt Creator v3.3.1
* unixODBC library v2.3.4 (built out from source file)
* Microsoft SQL Server ODBC driver for RedHat 6
The relationship/architecture of the softwares used for the access of MS SQL Server through ODBC driver is shown
as below block diagram:
Cause to that unixODBC library is depended by MS SQL Server ODBC driver for Linux and Qt SQL driver plugin, so
the first software to be installed is unixODBC library.
Linux CentOS 6.5
MS Windows
MS
SQL
Server
Qt
Application
MS SQL Server
ODBC Driver
For RedHat
Qt ODBC
Driver Plug-in
unixODBC
Driver
Manager
odbc.ini odbcinst.ini
Qt
Core Library
IP
network
Qt is Cute!
Qt is Cute!
Install unixODBC Driver/Library/Tool
On Unix/Linux system, it is recommended that you use unixODBC library (http://www.unixodbc.org). Qt SQL
ODBC driver plugin depends on it, so you need the unixODBC header files and shared libraries.
1) First of all, remove all installed unixODBC libraries and tools in the system.
# su (change to root)
$ yum erase unixodbc*
2) Download unixODBC source archive from one of below sites:
* http://www.unixodbc.org/download.html
* ftp://ftp.unixodbc.org/pub/unixODBC/
Here using v2.3.4, the source archive file is unixODBC-2.3.4.tar.gz.
Note:
There are two open source ODBC driver managers for UNIX/Linux systems:
* unixODBC
User Manual
http://www.unixodbc.org/doc/
* iODBC
http://www.iodbc.org/dataspace/iodbc/wiki/iODBC/
Qt is Cute!
Qt is Cute!
3) Unpack the source archive and it will create a folder named unixODBC-2.3.4.
$ tar zxvf unixODBC-2.3.4.tar.gz
4) Enter the unixODBC-2.3.4 folder and run commands:
$ ./configure --prefix=/usr --libdir=/usr/lib64 --sysconfdir=/etc --disable-gui --disable-drivers
--enable-stats=no --enable-iconv --with-iconv-char-enc=UTF8 --with-iconv-ucode-enc=UTF16LE
or
$ ./configure --prefix=/usr --libdir=/usr/lib64 --sysconfdir=/etc --enable-gui=no --enable-drivers=no
--enable-iconv --with-iconv-char-enc=UTF8 --with-iconv-ucode-enc=UTF16LE
$ make
$ su (change to root)
# make install
After installing, then create symbolic link to installed unxiODBC files:
# cd /usr/lib64
# ln -s ./libodbcinst.so.2.0.0 ./libodbcinst.so.1
# ln -s ./libodbc.so.2.0.0 ./libodbc.so.1
# ln -s ./libodbccr.so.2.0.0 ./libodbccr.so.1
Note
If you want to build out a 32-bit unixODBC library, it could use the configuration:
# ./configure --prefix=/usr --libdir=/usr/lib64 --sysconfdir=/etc --enable-iconv --with-iconv-char-enc=UTF8
--with-iconv-ucode-enc=UTF16LE --enable-gui=no --enable-drivers=no CFLAGS=-m32 LDFLAGS=-m32
CXXFLAGS=-m32
, the GCC compiler MUST support to build 32-bit software, or it will generate error!
Qt is Cute!
Qt is Cute!
5) After installing unixODBC library, it could use uniODBC command “odbcinst -j“ to view current unixODBC
library configuration.
The information about the location of unixODBC configuration files, odbc.ini and odbcinst.ini, could be
changed through environment variables ODBCINI (for odbc.ini) and ODBCSYSINI (for odbcinst.ini).
# export ODBCINI=.
# export ODBCSYSINI=.
Run command “odbcinst -j“ to show the path to the unixODBC configuration files.
One unixODBC utility, odbc_config, could be used to display paths to library headers and library SO file, this
could be used in compiling application or library using unixODBC library.
Qt is Cute!
Qt is Cute!
Qt is Cute!
Qt is Cute!
Install MS SQL Server ODBC Driver/Tool
Reference - https://technet.microsoft.com/en-us/library/hh568451(v=sql.110).aspx
1) Download MS SQL Server ODBC driver for RedHat 6 from the official site:
http://www.microsoft.com/en-us/download/details.aspx?id=36437
In this Web site, chek “RedHat6msodbcsql-11.0.2270.0.tar.gz” item.
2) Unpack MS SQL Server ODBC driver for RedHat 6 archive, it will generate a folder named
msodbcsql-11.0.2270.0 :
$ tar zxvf msodbcsql-11.0.2270.0.tar.gz
3) Enter msodbcsql-11.0.2270.0 folder, you could:
# run build_dm.sh shell script to build and install unixODBC 2.3.0 driver manager
(this is optional, you could build your unixODBC dirver manager whose version is greater than or equal to
Qt is Cute!
Qt is Cute!
v2.3.0)
# run install.sh shell script to install MS SQL Server ODBC driver.
Cause it had installed unixODBC v2.3.4, so just run install.sh shell script. Note that it needs root role to run
install.sh shell script. Run the command:
$ su (change to root)
# ./install.sh install --force
Enter “YES” to agree this license.
0
Qt is Cute!
Qt is Cute!
After installing the driver, it could know the driver install path by view
/tmp/msodbcsql.1764.10794.25272/install.log file.
4) To see the MS SQL Server tool sqlcmd installation path.
5) To use the MS SQL Server sqlcmd utility:
sqlcmd -S ServerName,ServerPort -U UserName -P Password -d DatabaseName
Ex:
sqlcmd -S 192.168.2.110,1433 -U william -P 1234 -d Test
If it could connect to MS SQL Server successfully, it wil show prompt “1>.” Under this prompt, you could enter
SQL statements and then type “go” to execute SQL statements. Below is an example for getting the version of
MS SQL Server.
Below is another example that runs “sp_help” to query T-SQL syntax:
Note
When installing MS SQL ODBC driver, if it shows it can not find
unixODBC library, it could add library searching path by the steps:
1) # su (change to root)
1) Open /etc/ld.so.conf file using a text editor, add the line:
/usr/lib64
2) Save the file and run command in root role:
# ldconfig
Qt is Cute!
Qt is Cute!
For the usage of MS SQL sqlcmd utility, it could be found in below sites:
* https://msdn.microsoft.com/library/ms162773
* https://technet.microsoft.com/en-us/library/ms188247
* https://technet.microsoft.com/en-us/library/ms180944
* https://technet.microsoft.com/en-us/library/ms170207
* https://technet.microsoft.com/en-us/library/ms166559
Qt is Cute!
Qt is Cute!
Install Qt ODBC SQL Driver Plugin
The Qt official site for plugin and SQL driver:
* http://doc.qt.io/qt-5/linux-deployment.html
* http://doc.qt.io/qt-5/sql-driver.html
When using qt-opensource-linux-x64-5.4.1.run to install Qt5 library, the SQL ODBC driver plugin does not be built
(as below snapshot). If you want to have this kind of SQL driver plugin, you could follow below steps to build out.
Steps to build out Qt SQL driver plugin:
1) Download Qt-Base source archive from the Qt Web site and extract it.
$ wget http://download.qt.io/archive/qt/5.4/5.4.1/submodules/qtandroidextras-opensource-src-5.4.1.tar.xz
or
$ curl -O http://download.qt.io/archive/qt/5.4/5.4.1/submodules/qtandroidextras-opensource-src-5.4.1.tar.xz
2) Unpack Qt-Base source archive and it will generate a Qt-Base source folder named
qtandroidextras-opensource-src-5.4.1.
$ tar zxvf qtandroidextras-opensource-src-5.4.1.tar.xz
3) Enter ODBC driver source folder under Qt-Base source folder and build ODBC driver plugin using QMake.
$ cd ./qtandroidextras-opensource-src-5.4.1/src/plugins/sqldrivers/odbc
$ qmake
$ make
If there has no unixODBC library headers installed, it will generate error messages (as below snapshot) when
building ODBC SQL driver plugin.
Qt is Cute!
Qt is Cute!
After building successfully, the resulting plugin file, libqsqlodbc.so, locates in the folder:
qtandroidextras-opensource-src-5.4.1/plugins/sqldrivers/
4) Put the built out ODBC SQL driver plugin file into your installed Qt library folder.
Copy this plugin file to the same directory (plugins/sqldrivers) of your installed Qt library. Below is an example,
the install path is /home/william/Qt5.4.1, and the SQL driver plugin folder is gcc_64/plugins/sqldrivers.
For Qt application that using ODBC way to connect a database, if it could not find ODBC SQL driver plugin file,
libqsqlodbc.so, it will issue the error message as below snapshot:
The search path for Qt plugins (as well as a few other paths) is hard-coded into the QtCore library. By default, the
first plugin search path will be hard-coded as /intall-path-of-Qt/plugins.
All Qt GUI applications require a plugin that implements the Qt Platform Abstraction (QPA) layer in Qt 5. For
example, for Linux/X11, the name of the platform plugin is libqxcb.so. This plugin file MSUT be located within a
specific subdirectory (by default, platforms) under your distribution directory. Alternatively, it is possible to adjust
the search path Qt uses to find its plugins.
Be sure to distribute any Qt plugins that you need with your application. Similar to the platform plugin, each type
of plugin MUST be located within a specific subdirectory (such as imageformats or sqldrivers) within your
distribution directory.
Qt will search plugins in these path in sequence:
1. The installation path of Qt library.
2. The current folder of the executing Qt application.
Qt is Cute!
Qt is Cute!
The paths in below snapshot are:
1) “/home/william/Qt5.4.1/5.4/gcc_64/plugins” is the Qt library installation path
2) “/home/william/qt_proj/qsqldb” is the place where the Qt application locates in
, this example is for SQL driver plugin, so there must have a folder named “sqldrivers” in one of the two paths.
Qt is Cute!
Qt is Cute!
Creating an ODBC Data Source Name (DSN) for Linux
A Data Source Name (DSN) is the logical name that is used by Open Database Connectivity (ODBC) to refer to the
drive and other information that is required to access data.
unixODBC has two configuration file (.ini) for ODBC driver and DSN:
* /etc/odbcinst.ini
* /etc/odbc.ini
(Note that the INI file (.ini) installation path (here using “/etc”) could be changed when doing configuration of
unixODBC source file using the option --sysconfdir)
The format and usage of unixODBC configuration file could be found in the site:
http://www.unixodbc.org/odbcinst.html
/etc/odbcinst.ini is for setting up ODBC driver. The format is:
* The "Driver" attribute here tells the driver manager which shared object to load for the ODBC driver.
* The “Setup” attribute is the name/location of the shared object which provides a dialogue allowing you to
create/edit DSNs for this driver.
For example,
Note that MS SQL ODBC Driver for Linux prodies an unixODBC driver configuration sample file under the folder
/tmp/msodbcsql.1764.10794.25272/ after installing it successfully.
For DSN setup, /etc/odbc.ini is for System Source of DSN, ~/.odbc.ini is for User Source.
[ODBC Driver Name]
Description = The description of ODBC driver for 32-bit operating system.
Driver = Path to driver shared object for 32-bit operating system.
Setiup = Path to driver setup shared object for 32-bit operating system.
Driver64 = Path to driver shared object for 64-bit operating system.
Setiup64 = Path to driver setup shared object for 64-bit operating system.
Qt is Cute!
Qt is Cute!
The format for ODBC DSN is:
For example,
After configuring ODBC driver and data source name, it could unixODBC utility, isql, to verify the connection to
remote MS SQL Server.
To use the MS SQL Server isql utility:
isql -v MSSQL UserName Password
Ex:
isql -v MSSQL william 1234
If it could connect to the remote MS SQL Server successfully, it will show below prompt for you to execute SQL
statements.
If it add the option “-n”, it will show a new style prompt:
[ODBC Data Source Name]
Description = The description for this connection.
Driver = The ODBC driver name defined in odbcinst.ini file
Server = Database Server IP Address,PortNumer
User = The user name for database server connection
Password = The password for database server connection
Database = Database Name
Qt is Cute!
Qt is Cute!
If the user name and/or password is/are wrong, it will show below error message:
isql : <unixODBC Driver Load Error> - [ISQL]ERROR: Could not SQLConnect
If the ODBC driver could not be found or fails to be loaded, it will display below error message:
There has mail list for this problem, it could refer to unixODBC mail list and the IBM site to find more information .
* http://mailman.unixodbc.org/pipermail/unixodbc-support/2004-October/subject.html
* http://www-01.ibm.com/support/docview.wss?uid=swg21229860
[william@localhost ~]$ isql -v MSSQL william 1234
[IM004][unixODBC][Driver Manager]Driver's SQLAllocHandle on SQL_HANDLE_HENV failed [ISQL]ERROR: Could not
SQLConnect
Qt is Cute!
Qt is Cute!
unixODBC GUI Configuring Tool
unixODBC project provides a GUI tool for configure ODBC driver and DSN. This tool was written in Qt 4, so if you
want to compile it using Qt 5, it needs to do some porting stuffs that is described in Qt official site:
https://wiki.qt.io/Transition_from_Qt_4.x_to_Qt5
The unixODBC GUI tool source could be download from SVN server:
http://sourceforge.net/p/unixodbc-gui-qt/code/HEAD/tree/trunk/
The SVN command to check out source:
svn checkout http://svn.code.sf.net/p/unixodbc-gui-qt/code/trunk unixodbc-gui-qt-code
or
svn checkout svn://svn.code.sf.net/p/unixodbc-gui-qt/code/trunk unixodbc-gui-qt-code
Qt is Cute!
Qt is Cute!
Qt SQL Programming
The Qt official sites about SQL programming:
* http://doc.qt.io/qt-5/qtsql-index.html
* http://doc.qt.io/qt-5/sql-programming.html
* http://doc.qt.io/qt-5/examples-sql.html
There have SQL relavant examples under Qt SDK installation folder:
Qt-Intall-Path/5.4.1/Examples/Qt-5.4/sql/
The below two snapshots shows that using sqlbrowser example to verify the access to a remote MS SQL Server
through ODBC:
1) In database connection setting dialogue:
* Drop down Driver combolist item to QODBC or QODBC3,
* In Database Name field, fill the Data Source Name (DSN) defined in odbc.ini, described in the previous
chapter. The DSN used here is MSSQL.
* In Username and Password fields, fill the account and password to log on remote MS SQL Server.
These are set by MS SQL Server administrator in advance, so if you do not know this information for you,
please contact your MS SQL Server administrator.
Qt is Cute!
Qt is Cute!
2) If the ODBC connection could be created successfully, it will show table list under this ODBC connection node
on the righ “database” panel.
In “SQL Query” input panel, you could enter SQL query statement for testing.
If the SQL query is execute successfully, it will show “Query OK.” message on the status bar and the query
result would be shown on the panel near to “database” panel.
Qt is Cute!
Qt is Cute!
Below snapshots show the outputs of Qt SQL program usin Qt Core SQL library:
* Show a list tables in current database using Qt:
*Show the verison of MS SQL Server using Qt:
Qt is Cute!
Qt is Cute!
Reference
* http://stackoverflow.com/questions/14207088/qt-5-odbc-driver-issue
* http://www.freetds.org/userguide/qt.htm
* http://www.freetds.org/userguide/uodbc.htm
* https://blog.afoolishmanifesto.com/posts/install-and-configure-the-ms-odbc-driver-on-debian/
* https://jazz.net/forum/questions/57326/64-bit-odbc-driver-support-for-linux
* http://lifeofageekadmin.com/install-microsoft-sql-drivers-unixodbc-2-3-0-rhel-6-64-bit/
* http://webdev.blogs.southwales.ac.uk/2011/08/04/32-bit-odbc-driver-with-32-bit-unixodbc-on-a-64-bit-ubuntu-os/
* http://www.kognitio.com/forums/Installing%20Microsoft%20SQL%20Server%20Linux%20ODBC%20Driver.pdf
* http://www.easysoft.com/developer/interfaces/odbc/linux.html

More Related Content

What's hot (20)

PPTX
Introducing type script
Remo Jansen
 
PDF
TypeScript Best Practices
felixbillon
 
PPTX
Webpack Introduction
Anjali Chawla
 
PPTX
JAVASCRIPT PPT [Autosaved].pptx
AchieversIT
 
PPTX
XML Document Object Model (DOM)
BOSS Webtech
 
PPTX
Css selectors
Dinesh Kumar
 
PDF
React Router: React Meetup XXL
Rob Gietema
 
PDF
[부스트캠퍼세미나]조성동_야_너두_TDD_할_수_있어
CONNECT FOUNDATION
 
PDF
Svelte JS introduction
Mikhail Kuznetcov
 
PPTX
TypeScript Overview
Aniruddha Chakrabarti
 
PPTX
C++ Constructor and Destructors.pptx
sasukeman
 
PPTX
Understanding react hooks
Maulik Shah
 
PDF
Modern JavaScript Frameworks: Angular, React & Vue.js
Jonas Bandi
 
PDF
TypeScript Introduction
Dmitry Sheiko
 
PPT
JavaScript Tutorial
Bui Kiet
 
PDF
The New JavaScript: ES6
Rob Eisenberg
 
PPTX
ReactJS presentation.pptx
DivyanshGupta922023
 
PPTX
Program control statements in c#
Dr.Neeraj Kumar Pandey
 
PDF
Full Stack React Workshop [CSSC x GDSC]
GDSC UofT Mississauga
 
PDF
Introduction to Spring Boot
Trey Howard
 
Introducing type script
Remo Jansen
 
TypeScript Best Practices
felixbillon
 
Webpack Introduction
Anjali Chawla
 
JAVASCRIPT PPT [Autosaved].pptx
AchieversIT
 
XML Document Object Model (DOM)
BOSS Webtech
 
Css selectors
Dinesh Kumar
 
React Router: React Meetup XXL
Rob Gietema
 
[부스트캠퍼세미나]조성동_야_너두_TDD_할_수_있어
CONNECT FOUNDATION
 
Svelte JS introduction
Mikhail Kuznetcov
 
TypeScript Overview
Aniruddha Chakrabarti
 
C++ Constructor and Destructors.pptx
sasukeman
 
Understanding react hooks
Maulik Shah
 
Modern JavaScript Frameworks: Angular, React & Vue.js
Jonas Bandi
 
TypeScript Introduction
Dmitry Sheiko
 
JavaScript Tutorial
Bui Kiet
 
The New JavaScript: ES6
Rob Eisenberg
 
ReactJS presentation.pptx
DivyanshGupta922023
 
Program control statements in c#
Dr.Neeraj Kumar Pandey
 
Full Stack React Workshop [CSSC x GDSC]
GDSC UofT Mississauga
 
Introduction to Spring Boot
Trey Howard
 

Viewers also liked (20)

PDF
Usage Note of Apache Thrift for C++ Java PHP Languages
William Lee
 
PDF
Upgrade GCC & Install Qt 5.4 on CentOS 6.5
William Lee
 
PDF
Usage Note of SWIG for PHP
William Lee
 
PDF
Usage Notes of The Bro 2.2 / 2.3
William Lee
 
PDF
Android Services and Managers Basic
William Lee
 
PDF
GNOME GeoClue - The Geolocation Service in Gnome
William Lee
 
PDF
Android Debugging (Chinese)
William Lee
 
PDF
Moblin2 - Window Manager(Mutter) Plugin
William Lee
 
PDF
Android Storage - StorageManager & OBB
William Lee
 
PDF
CWMP TR-069 Training (Chinese)
William Lee
 
PDF
Introdunction To Network Management Protocols SNMP & TR-069
William Lee
 
PDF
Qt Development Tools
William Lee
 
PDF
Android Logging System
William Lee
 
PDF
Asterisk (IP-PBX) CDR Log Rotation
William Lee
 
PDF
IPv6 Overview
William Lee
 
PDF
MGCP Overview
William Lee
 
PDF
Android Storage - Internal and External Storages
William Lee
 
PDF
Introduction to SIP(Session Initiation Protocol)
William Lee
 
PDF
MTP & PTP
William Lee
 
PDF
Introdunction to Network Management Protocols - SNMP & TR-069
William Lee
 
Usage Note of Apache Thrift for C++ Java PHP Languages
William Lee
 
Upgrade GCC & Install Qt 5.4 on CentOS 6.5
William Lee
 
Usage Note of SWIG for PHP
William Lee
 
Usage Notes of The Bro 2.2 / 2.3
William Lee
 
Android Services and Managers Basic
William Lee
 
GNOME GeoClue - The Geolocation Service in Gnome
William Lee
 
Android Debugging (Chinese)
William Lee
 
Moblin2 - Window Manager(Mutter) Plugin
William Lee
 
Android Storage - StorageManager & OBB
William Lee
 
CWMP TR-069 Training (Chinese)
William Lee
 
Introdunction To Network Management Protocols SNMP & TR-069
William Lee
 
Qt Development Tools
William Lee
 
Android Logging System
William Lee
 
Asterisk (IP-PBX) CDR Log Rotation
William Lee
 
IPv6 Overview
William Lee
 
MGCP Overview
William Lee
 
Android Storage - Internal and External Storages
William Lee
 
Introduction to SIP(Session Initiation Protocol)
William Lee
 
MTP & PTP
William Lee
 
Introdunction to Network Management Protocols - SNMP & TR-069
William Lee
 
Ad

Similar to Usage Note of Qt ODBC Database Access on Linux (20)

PDF
Oracle to MySQL DatabaseLink
Osama Mustafa
 
PDF
Swift configurator installation-manual
Pramod Sharma
 
PDF
CM_SME revised bc635_637PCI_V2_Linux_SDK
Chris Muntzer
 
PDF
Steps to Create odbc connection linux
Osama Mustafa
 
PPTX
Install .Net Core, SQL Server V-Next on Linux and deploy .Net core applicatio...
Ajith Ramawickrama
 
PDF
Medooze MCU Video Multiconference Server Installation and configuration guide...
sreeharsha43
 
PDF
Build Automation 101
Martin Jackson
 
PDF
VoltDB on SolftLayer Cloud
SkylabReddy Vanga
 
PPTX
android sqlite
Deepa Rani
 
PPTX
Ultimate Free SQL Server Toolkit
Kevin Kline
 
PDF
DEF CON 27 - workshop - ISAAC EVANS - discover exploit and eradicate entire v...
Felipe Prado
 
PPTX
Scaling Docker Containers using Kubernetes and Azure Container Service
Ben Hall
 
DOCX
Tutorial to setup OpenStreetMap tileserver with customized boundaries of India
Arun Ganesh
 
PDF
Developing and Deploying PHP with Docker
Patrick Mizer
 
PPTX
[Codelab 2017] Docker 기초 및 활용 방안
양재동 코드랩
 
PDF
Microsoft SQL Server with Linux and Docker
roskakori
 
PPTX
Docker - Demo on PHP Application deployment
Arun prasath
 
PDF
Ibi Open Visualizations
Clif Kranish
 
PPTX
Service Discovery using etcd, Consul and Kubernetes
Sreenivas Makam
 
PDF
Reusing your existing software on Android
Tetsuyuki Kobayashi
 
Oracle to MySQL DatabaseLink
Osama Mustafa
 
Swift configurator installation-manual
Pramod Sharma
 
CM_SME revised bc635_637PCI_V2_Linux_SDK
Chris Muntzer
 
Steps to Create odbc connection linux
Osama Mustafa
 
Install .Net Core, SQL Server V-Next on Linux and deploy .Net core applicatio...
Ajith Ramawickrama
 
Medooze MCU Video Multiconference Server Installation and configuration guide...
sreeharsha43
 
Build Automation 101
Martin Jackson
 
VoltDB on SolftLayer Cloud
SkylabReddy Vanga
 
android sqlite
Deepa Rani
 
Ultimate Free SQL Server Toolkit
Kevin Kline
 
DEF CON 27 - workshop - ISAAC EVANS - discover exploit and eradicate entire v...
Felipe Prado
 
Scaling Docker Containers using Kubernetes and Azure Container Service
Ben Hall
 
Tutorial to setup OpenStreetMap tileserver with customized boundaries of India
Arun Ganesh
 
Developing and Deploying PHP with Docker
Patrick Mizer
 
[Codelab 2017] Docker 기초 및 활용 방안
양재동 코드랩
 
Microsoft SQL Server with Linux and Docker
roskakori
 
Docker - Demo on PHP Application deployment
Arun prasath
 
Ibi Open Visualizations
Clif Kranish
 
Service Discovery using etcd, Consul and Kubernetes
Sreenivas Makam
 
Reusing your existing software on Android
Tetsuyuki Kobayashi
 
Ad

More from William Lee (16)

PDF
Viewing Android Source Files in Eclipse (Chinese)
William Lee
 
PDF
Usage Note of Microsoft Dependency Walker
William Lee
 
PDF
Usage Note of PlayCap
William Lee
 
PDF
Qt4 App - Sliding Window
William Lee
 
PDF
GTK+ 2.0 App - Desktop App Chooser
William Lee
 
PDF
GTK+ 2.0 App - Icon Chooser
William Lee
 
PDF
Note of CGI and ASP
William Lee
 
PDF
L.A.M.P Installation Note --- CentOS 6.5
William Lee
 
PDF
C Program Runs on Wrong Target Platform(CPU Architecture)
William Lee
 
PDF
Internationalization(i18n) of Web Page
William Lee
 
PDF
Notes for SQLite3 Usage
William Lee
 
PDF
Cygwin Install How-To (Chinese)
William Lee
 
PDF
Study of Chromium OS
William Lee
 
PDF
More Details about TR-069 (CPE WAN Management Protocol)
William Lee
 
PDF
Qt Animation
William Lee
 
PDF
Android Storage - Vold
William Lee
 
Viewing Android Source Files in Eclipse (Chinese)
William Lee
 
Usage Note of Microsoft Dependency Walker
William Lee
 
Usage Note of PlayCap
William Lee
 
Qt4 App - Sliding Window
William Lee
 
GTK+ 2.0 App - Desktop App Chooser
William Lee
 
GTK+ 2.0 App - Icon Chooser
William Lee
 
Note of CGI and ASP
William Lee
 
L.A.M.P Installation Note --- CentOS 6.5
William Lee
 
C Program Runs on Wrong Target Platform(CPU Architecture)
William Lee
 
Internationalization(i18n) of Web Page
William Lee
 
Notes for SQLite3 Usage
William Lee
 
Cygwin Install How-To (Chinese)
William Lee
 
Study of Chromium OS
William Lee
 
More Details about TR-069 (CPE WAN Management Protocol)
William Lee
 
Qt Animation
William Lee
 
Android Storage - Vold
William Lee
 

Recently uploaded (20)

PDF
My Journey from CAD to BIM: A True Underdog Story
Safe Software
 
PDF
LLM Search Readiness Audit - Dentsu x SEO Square - June 2025.pdf
Nick Samuel
 
PPTX
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Pitch ...
Michele Kryston
 
PPTX
Simplifica la seguridad en la nube y la detección de amenazas con FortiCNAPP
Cristian Garcia G.
 
PPTX
Practical Applications of AI in Local Government
OnBoard
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PDF
Unlocking FME Flow’s Potential: Architecture Design for Modern Enterprises
Safe Software
 
PDF
The Future of Product Management in AI ERA.pdf
Alyona Owens
 
PDF
Why aren't you using FME Flow's CPU Time?
Safe Software
 
PPTX
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Poster...
Michele Kryston
 
PDF
Optimizing the trajectory of a wheel loader working in short loading cycles
Reno Filla
 
DOCX
Daily Lesson Log MATATAG ICT TEchnology 8
LOIDAALMAZAN3
 
PDF
Open Source Milvus Vector Database v 2.6
Zilliz
 
PDF
Automating the Geo-Referencing of Historic Aerial Photography in Flanders
Safe Software
 
PPTX
reInforce 2025 Lightning Talk - Scott Francis.pptx
ScottFrancis51
 
PPSX
Usergroup - OutSystems Architecture.ppsx
Kurt Vandevelde
 
PPTX
CapCut Pro Crack For PC Latest Version {Fully Unlocked} 2025
pcprocore
 
PDF
Cracking the Code - Unveiling Synergies Between Open Source Security and AI.pdf
Priyanka Aash
 
PDF
Hyderabad MuleSoft In-Person Meetup (June 21, 2025) Slides
Ravi Tamada
 
PDF
“MPU+: A Transformative Solution for Next-Gen AI at the Edge,” a Presentation...
Edge AI and Vision Alliance
 
My Journey from CAD to BIM: A True Underdog Story
Safe Software
 
LLM Search Readiness Audit - Dentsu x SEO Square - June 2025.pdf
Nick Samuel
 
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Pitch ...
Michele Kryston
 
Simplifica la seguridad en la nube y la detección de amenazas con FortiCNAPP
Cristian Garcia G.
 
Practical Applications of AI in Local Government
OnBoard
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
Unlocking FME Flow’s Potential: Architecture Design for Modern Enterprises
Safe Software
 
The Future of Product Management in AI ERA.pdf
Alyona Owens
 
Why aren't you using FME Flow's CPU Time?
Safe Software
 
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Poster...
Michele Kryston
 
Optimizing the trajectory of a wheel loader working in short loading cycles
Reno Filla
 
Daily Lesson Log MATATAG ICT TEchnology 8
LOIDAALMAZAN3
 
Open Source Milvus Vector Database v 2.6
Zilliz
 
Automating the Geo-Referencing of Historic Aerial Photography in Flanders
Safe Software
 
reInforce 2025 Lightning Talk - Scott Francis.pptx
ScottFrancis51
 
Usergroup - OutSystems Architecture.ppsx
Kurt Vandevelde
 
CapCut Pro Crack For PC Latest Version {Fully Unlocked} 2025
pcprocore
 
Cracking the Code - Unveiling Synergies Between Open Source Security and AI.pdf
Priyanka Aash
 
Hyderabad MuleSoft In-Person Meetup (June 21, 2025) Slides
Ravi Tamada
 
“MPU+: A Transformative Solution for Next-Gen AI at the Edge,” a Presentation...
Edge AI and Vision Alliance
 

Usage Note of Qt ODBC Database Access on Linux

  • 1. Qt is Cute! Qt is Cute! Usage Note of Qt ODBC Database Access On Linux William.L [email protected] 2015-10-05
  • 2. Qt is Cute! Qt is Cute! Index What is ODBC? ............................................................................................................................................................ 3 Environment................................................................................................................................................................ 4 Install unixODBC Driver/Library/Tool......................................................................................................................... 5 Install MS SQL Server ODBC Driver/Tool.................................................................................................................... 9 Install Qt ODBC SQL Driver Plugin ............................................................................................................................ 13 Creating an ODBC Data Source Name (DSN) for Linux............................................................................................. 16 unixODBC GUI Configuring Tool........................................................................................................................ 19 Qt SQL Programming................................................................................................................................................. 20 Reference................................................................................................................................................................... 23
  • 3. Qt is Cute! Qt is Cute! What is ODBC? ODBC is the acronym for Open DataBase Connectivity, a Microsoft Universal Data Access standard that started life as the Windows implementation of the X/Open SQL Call Level Interface specification. Since its inception in 1992 it has rapidly become the industry standard interface for developing database independent applications. Example codes using Qt Core SQL library and relavant reference for this documentation could be downloaded from the GitHub: https://github.com/wiliwe/qt-sql-odbc-prog-example
  • 4. Qt is Cute! Qt is Cute! Environment * Linux CentOS 6.5 64-bit (upgraded to 6.7) * Qt v5.4.1 * Qt Creator v3.3.1 * unixODBC library v2.3.4 (built out from source file) * Microsoft SQL Server ODBC driver for RedHat 6 The relationship/architecture of the softwares used for the access of MS SQL Server through ODBC driver is shown as below block diagram: Cause to that unixODBC library is depended by MS SQL Server ODBC driver for Linux and Qt SQL driver plugin, so the first software to be installed is unixODBC library. Linux CentOS 6.5 MS Windows MS SQL Server Qt Application MS SQL Server ODBC Driver For RedHat Qt ODBC Driver Plug-in unixODBC Driver Manager odbc.ini odbcinst.ini Qt Core Library IP network
  • 5. Qt is Cute! Qt is Cute! Install unixODBC Driver/Library/Tool On Unix/Linux system, it is recommended that you use unixODBC library (http://www.unixodbc.org). Qt SQL ODBC driver plugin depends on it, so you need the unixODBC header files and shared libraries. 1) First of all, remove all installed unixODBC libraries and tools in the system. # su (change to root) $ yum erase unixodbc* 2) Download unixODBC source archive from one of below sites: * http://www.unixodbc.org/download.html * ftp://ftp.unixodbc.org/pub/unixODBC/ Here using v2.3.4, the source archive file is unixODBC-2.3.4.tar.gz. Note: There are two open source ODBC driver managers for UNIX/Linux systems: * unixODBC User Manual http://www.unixodbc.org/doc/ * iODBC http://www.iodbc.org/dataspace/iodbc/wiki/iODBC/
  • 6. Qt is Cute! Qt is Cute! 3) Unpack the source archive and it will create a folder named unixODBC-2.3.4. $ tar zxvf unixODBC-2.3.4.tar.gz 4) Enter the unixODBC-2.3.4 folder and run commands: $ ./configure --prefix=/usr --libdir=/usr/lib64 --sysconfdir=/etc --disable-gui --disable-drivers --enable-stats=no --enable-iconv --with-iconv-char-enc=UTF8 --with-iconv-ucode-enc=UTF16LE or $ ./configure --prefix=/usr --libdir=/usr/lib64 --sysconfdir=/etc --enable-gui=no --enable-drivers=no --enable-iconv --with-iconv-char-enc=UTF8 --with-iconv-ucode-enc=UTF16LE $ make $ su (change to root) # make install After installing, then create symbolic link to installed unxiODBC files: # cd /usr/lib64 # ln -s ./libodbcinst.so.2.0.0 ./libodbcinst.so.1 # ln -s ./libodbc.so.2.0.0 ./libodbc.so.1 # ln -s ./libodbccr.so.2.0.0 ./libodbccr.so.1 Note If you want to build out a 32-bit unixODBC library, it could use the configuration: # ./configure --prefix=/usr --libdir=/usr/lib64 --sysconfdir=/etc --enable-iconv --with-iconv-char-enc=UTF8 --with-iconv-ucode-enc=UTF16LE --enable-gui=no --enable-drivers=no CFLAGS=-m32 LDFLAGS=-m32 CXXFLAGS=-m32 , the GCC compiler MUST support to build 32-bit software, or it will generate error!
  • 7. Qt is Cute! Qt is Cute! 5) After installing unixODBC library, it could use uniODBC command “odbcinst -j“ to view current unixODBC library configuration. The information about the location of unixODBC configuration files, odbc.ini and odbcinst.ini, could be changed through environment variables ODBCINI (for odbc.ini) and ODBCSYSINI (for odbcinst.ini). # export ODBCINI=. # export ODBCSYSINI=. Run command “odbcinst -j“ to show the path to the unixODBC configuration files. One unixODBC utility, odbc_config, could be used to display paths to library headers and library SO file, this could be used in compiling application or library using unixODBC library.
  • 8. Qt is Cute! Qt is Cute!
  • 9. Qt is Cute! Qt is Cute! Install MS SQL Server ODBC Driver/Tool Reference - https://technet.microsoft.com/en-us/library/hh568451(v=sql.110).aspx 1) Download MS SQL Server ODBC driver for RedHat 6 from the official site: http://www.microsoft.com/en-us/download/details.aspx?id=36437 In this Web site, chek “RedHat6msodbcsql-11.0.2270.0.tar.gz” item. 2) Unpack MS SQL Server ODBC driver for RedHat 6 archive, it will generate a folder named msodbcsql-11.0.2270.0 : $ tar zxvf msodbcsql-11.0.2270.0.tar.gz 3) Enter msodbcsql-11.0.2270.0 folder, you could: # run build_dm.sh shell script to build and install unixODBC 2.3.0 driver manager (this is optional, you could build your unixODBC dirver manager whose version is greater than or equal to
  • 10. Qt is Cute! Qt is Cute! v2.3.0) # run install.sh shell script to install MS SQL Server ODBC driver. Cause it had installed unixODBC v2.3.4, so just run install.sh shell script. Note that it needs root role to run install.sh shell script. Run the command: $ su (change to root) # ./install.sh install --force Enter “YES” to agree this license. 0
  • 11. Qt is Cute! Qt is Cute! After installing the driver, it could know the driver install path by view /tmp/msodbcsql.1764.10794.25272/install.log file. 4) To see the MS SQL Server tool sqlcmd installation path. 5) To use the MS SQL Server sqlcmd utility: sqlcmd -S ServerName,ServerPort -U UserName -P Password -d DatabaseName Ex: sqlcmd -S 192.168.2.110,1433 -U william -P 1234 -d Test If it could connect to MS SQL Server successfully, it wil show prompt “1>.” Under this prompt, you could enter SQL statements and then type “go” to execute SQL statements. Below is an example for getting the version of MS SQL Server. Below is another example that runs “sp_help” to query T-SQL syntax: Note When installing MS SQL ODBC driver, if it shows it can not find unixODBC library, it could add library searching path by the steps: 1) # su (change to root) 1) Open /etc/ld.so.conf file using a text editor, add the line: /usr/lib64 2) Save the file and run command in root role: # ldconfig
  • 12. Qt is Cute! Qt is Cute! For the usage of MS SQL sqlcmd utility, it could be found in below sites: * https://msdn.microsoft.com/library/ms162773 * https://technet.microsoft.com/en-us/library/ms188247 * https://technet.microsoft.com/en-us/library/ms180944 * https://technet.microsoft.com/en-us/library/ms170207 * https://technet.microsoft.com/en-us/library/ms166559
  • 13. Qt is Cute! Qt is Cute! Install Qt ODBC SQL Driver Plugin The Qt official site for plugin and SQL driver: * http://doc.qt.io/qt-5/linux-deployment.html * http://doc.qt.io/qt-5/sql-driver.html When using qt-opensource-linux-x64-5.4.1.run to install Qt5 library, the SQL ODBC driver plugin does not be built (as below snapshot). If you want to have this kind of SQL driver plugin, you could follow below steps to build out. Steps to build out Qt SQL driver plugin: 1) Download Qt-Base source archive from the Qt Web site and extract it. $ wget http://download.qt.io/archive/qt/5.4/5.4.1/submodules/qtandroidextras-opensource-src-5.4.1.tar.xz or $ curl -O http://download.qt.io/archive/qt/5.4/5.4.1/submodules/qtandroidextras-opensource-src-5.4.1.tar.xz 2) Unpack Qt-Base source archive and it will generate a Qt-Base source folder named qtandroidextras-opensource-src-5.4.1. $ tar zxvf qtandroidextras-opensource-src-5.4.1.tar.xz 3) Enter ODBC driver source folder under Qt-Base source folder and build ODBC driver plugin using QMake. $ cd ./qtandroidextras-opensource-src-5.4.1/src/plugins/sqldrivers/odbc $ qmake $ make If there has no unixODBC library headers installed, it will generate error messages (as below snapshot) when building ODBC SQL driver plugin.
  • 14. Qt is Cute! Qt is Cute! After building successfully, the resulting plugin file, libqsqlodbc.so, locates in the folder: qtandroidextras-opensource-src-5.4.1/plugins/sqldrivers/ 4) Put the built out ODBC SQL driver plugin file into your installed Qt library folder. Copy this plugin file to the same directory (plugins/sqldrivers) of your installed Qt library. Below is an example, the install path is /home/william/Qt5.4.1, and the SQL driver plugin folder is gcc_64/plugins/sqldrivers. For Qt application that using ODBC way to connect a database, if it could not find ODBC SQL driver plugin file, libqsqlodbc.so, it will issue the error message as below snapshot: The search path for Qt plugins (as well as a few other paths) is hard-coded into the QtCore library. By default, the first plugin search path will be hard-coded as /intall-path-of-Qt/plugins. All Qt GUI applications require a plugin that implements the Qt Platform Abstraction (QPA) layer in Qt 5. For example, for Linux/X11, the name of the platform plugin is libqxcb.so. This plugin file MSUT be located within a specific subdirectory (by default, platforms) under your distribution directory. Alternatively, it is possible to adjust the search path Qt uses to find its plugins. Be sure to distribute any Qt plugins that you need with your application. Similar to the platform plugin, each type of plugin MUST be located within a specific subdirectory (such as imageformats or sqldrivers) within your distribution directory. Qt will search plugins in these path in sequence: 1. The installation path of Qt library. 2. The current folder of the executing Qt application.
  • 15. Qt is Cute! Qt is Cute! The paths in below snapshot are: 1) “/home/william/Qt5.4.1/5.4/gcc_64/plugins” is the Qt library installation path 2) “/home/william/qt_proj/qsqldb” is the place where the Qt application locates in , this example is for SQL driver plugin, so there must have a folder named “sqldrivers” in one of the two paths.
  • 16. Qt is Cute! Qt is Cute! Creating an ODBC Data Source Name (DSN) for Linux A Data Source Name (DSN) is the logical name that is used by Open Database Connectivity (ODBC) to refer to the drive and other information that is required to access data. unixODBC has two configuration file (.ini) for ODBC driver and DSN: * /etc/odbcinst.ini * /etc/odbc.ini (Note that the INI file (.ini) installation path (here using “/etc”) could be changed when doing configuration of unixODBC source file using the option --sysconfdir) The format and usage of unixODBC configuration file could be found in the site: http://www.unixodbc.org/odbcinst.html /etc/odbcinst.ini is for setting up ODBC driver. The format is: * The "Driver" attribute here tells the driver manager which shared object to load for the ODBC driver. * The “Setup” attribute is the name/location of the shared object which provides a dialogue allowing you to create/edit DSNs for this driver. For example, Note that MS SQL ODBC Driver for Linux prodies an unixODBC driver configuration sample file under the folder /tmp/msodbcsql.1764.10794.25272/ after installing it successfully. For DSN setup, /etc/odbc.ini is for System Source of DSN, ~/.odbc.ini is for User Source. [ODBC Driver Name] Description = The description of ODBC driver for 32-bit operating system. Driver = Path to driver shared object for 32-bit operating system. Setiup = Path to driver setup shared object for 32-bit operating system. Driver64 = Path to driver shared object for 64-bit operating system. Setiup64 = Path to driver setup shared object for 64-bit operating system.
  • 17. Qt is Cute! Qt is Cute! The format for ODBC DSN is: For example, After configuring ODBC driver and data source name, it could unixODBC utility, isql, to verify the connection to remote MS SQL Server. To use the MS SQL Server isql utility: isql -v MSSQL UserName Password Ex: isql -v MSSQL william 1234 If it could connect to the remote MS SQL Server successfully, it will show below prompt for you to execute SQL statements. If it add the option “-n”, it will show a new style prompt: [ODBC Data Source Name] Description = The description for this connection. Driver = The ODBC driver name defined in odbcinst.ini file Server = Database Server IP Address,PortNumer User = The user name for database server connection Password = The password for database server connection Database = Database Name
  • 18. Qt is Cute! Qt is Cute! If the user name and/or password is/are wrong, it will show below error message: isql : <unixODBC Driver Load Error> - [ISQL]ERROR: Could not SQLConnect If the ODBC driver could not be found or fails to be loaded, it will display below error message: There has mail list for this problem, it could refer to unixODBC mail list and the IBM site to find more information . * http://mailman.unixodbc.org/pipermail/unixodbc-support/2004-October/subject.html * http://www-01.ibm.com/support/docview.wss?uid=swg21229860 [william@localhost ~]$ isql -v MSSQL william 1234 [IM004][unixODBC][Driver Manager]Driver's SQLAllocHandle on SQL_HANDLE_HENV failed [ISQL]ERROR: Could not SQLConnect
  • 19. Qt is Cute! Qt is Cute! unixODBC GUI Configuring Tool unixODBC project provides a GUI tool for configure ODBC driver and DSN. This tool was written in Qt 4, so if you want to compile it using Qt 5, it needs to do some porting stuffs that is described in Qt official site: https://wiki.qt.io/Transition_from_Qt_4.x_to_Qt5 The unixODBC GUI tool source could be download from SVN server: http://sourceforge.net/p/unixodbc-gui-qt/code/HEAD/tree/trunk/ The SVN command to check out source: svn checkout http://svn.code.sf.net/p/unixodbc-gui-qt/code/trunk unixodbc-gui-qt-code or svn checkout svn://svn.code.sf.net/p/unixodbc-gui-qt/code/trunk unixodbc-gui-qt-code
  • 20. Qt is Cute! Qt is Cute! Qt SQL Programming The Qt official sites about SQL programming: * http://doc.qt.io/qt-5/qtsql-index.html * http://doc.qt.io/qt-5/sql-programming.html * http://doc.qt.io/qt-5/examples-sql.html There have SQL relavant examples under Qt SDK installation folder: Qt-Intall-Path/5.4.1/Examples/Qt-5.4/sql/ The below two snapshots shows that using sqlbrowser example to verify the access to a remote MS SQL Server through ODBC: 1) In database connection setting dialogue: * Drop down Driver combolist item to QODBC or QODBC3, * In Database Name field, fill the Data Source Name (DSN) defined in odbc.ini, described in the previous chapter. The DSN used here is MSSQL. * In Username and Password fields, fill the account and password to log on remote MS SQL Server. These are set by MS SQL Server administrator in advance, so if you do not know this information for you, please contact your MS SQL Server administrator.
  • 21. Qt is Cute! Qt is Cute! 2) If the ODBC connection could be created successfully, it will show table list under this ODBC connection node on the righ “database” panel. In “SQL Query” input panel, you could enter SQL query statement for testing. If the SQL query is execute successfully, it will show “Query OK.” message on the status bar and the query result would be shown on the panel near to “database” panel.
  • 22. Qt is Cute! Qt is Cute! Below snapshots show the outputs of Qt SQL program usin Qt Core SQL library: * Show a list tables in current database using Qt: *Show the verison of MS SQL Server using Qt:
  • 23. Qt is Cute! Qt is Cute! Reference * http://stackoverflow.com/questions/14207088/qt-5-odbc-driver-issue * http://www.freetds.org/userguide/qt.htm * http://www.freetds.org/userguide/uodbc.htm * https://blog.afoolishmanifesto.com/posts/install-and-configure-the-ms-odbc-driver-on-debian/ * https://jazz.net/forum/questions/57326/64-bit-odbc-driver-support-for-linux * http://lifeofageekadmin.com/install-microsoft-sql-drivers-unixodbc-2-3-0-rhel-6-64-bit/ * http://webdev.blogs.southwales.ac.uk/2011/08/04/32-bit-odbc-driver-with-32-bit-unixodbc-on-a-64-bit-ubuntu-os/ * http://www.kognitio.com/forums/Installing%20Microsoft%20SQL%20Server%20Linux%20ODBC%20Driver.pdf * http://www.easysoft.com/developer/interfaces/odbc/linux.html