how to use dart odbc with mariadb 10.1 on linux

208 Views Asked by At

Has anybody managed to make use of the odbc library on linux / ubuntu 14.04 with the odbc driver for mariadb 10.1? After install from pub and running a test case, I get the error

Cannot find extension library'package:odbc/odbc.dart': error: line 25 pos 1: library handler failed
import "dart-ext:odbc_ext";
^

And if I want to compile the extension I get a peculiar error:

odbc_ext_sql.cc:148:64: error: ‘SQLCancelHandle’ was not declared in this scope
                                         unboxSqlHandle(ARGS(1)));
                                                                ^
odbc_ext_sql.cc: In function ‘void sqlSetParam(Dart_NativeArguments)’:
odbc_ext_sql.cc:904:64: error: cannot convert ‘SQLINTEGER* {aka int*}’ to ‘SQLLEN* {aka long int*}’ for argument ‘8’ to ‘SQLRETURN SQLSetParam(SQLHSTMT, SQLUSMALLINT, SQLSMALLINT, SQLSMALLINT, SQLULEN, SQLSMALLINT, SQLPOINTER, SQLLEN*)’
                                     unboxSqlIntegerPtr(ARGS(7)));
                                                                ^

I would prefer this way over mysql/sqljocky and need to evaluate if its a good fit for production.

0

There are 0 best solutions below