In my project I try to use MariaDB Connector/ODBC. I downloaded MariaDB Connector 1.0 from https://mariadb.com/kb/en/mariadb/about-mariadb-connector-odbc/ for Win64 and ODBC driver 3.5 for Win64 from https://dev.mysql.com/downloads/connector/odbc/3.51.html
Then I created DSN through ODBC Data Source Administration.http://imgur.com/FMunxtI As you see connection is successful.
Also when I run this code -
Database* database = GetSubsystem<Database>(); DbConnection* connection = database->Connect("DSN=HangarsDSN");
I get valid DbConnection pointer and code
returns true. So I assume that connection to database is established.
But when I try to execute statement like -
DbResult result = connection->Execute("select * from test", true);
I always get error -
[Sun Jan 03 12:45:01 2016] ERROR: Could not execute: nanodbc:\Programming\Projec
In nanodbc.cpp on 1036 line is following code -
void open(class connection& conn)
open_ = success(rc);
conn_ = conn;
I can’t figure out why it can’t execute. Is it invalid connection to database, or something wrong with ODBC driver. Also I tried to pass different statements, but got the same error.
SQL server locates on web hosting - https://www.host.sk/
Maybe someone knows what the problem is ?