buggins / ddbc

DDBC is DB Connector for D language (similar to JDBC)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot build using sample code

MikeRobbieNZ opened this issue · comments

I am new to D. I have been testing out some of the languages capabilities and was very interested in ddbc

I get the following build error when using example code
C:\Users\micha\AppData\Local\dub\packages\ddbc-0.5.3\ddbc\source\ddbc\drivers\odbcddbc.d(333,24): Error: cannot implicitly convert expression 0 of type int to void*
C:\Users\micha\AppData\Local\dub\packages\ddbc-0.5.3\ddbc\source\ddbc\drivers\odbcddbc.d(334,24): Error: cannot implicitly convert expression 0 of type int to void*

The associated code in the odbcddbc.d file is
SQLHENV henv = SQL_NULL_HENV;
SQLHDBC conn = SQL_NULL_HDBC;

Being new to the language I have tried to cast and initiialise the variables,with no luck.

I cannot see any existing or past issues relating to this. Any help would greatly appreciated!!

You can avoid this by using an older release of the D compiler. Also, are you planning to use ddbc with MS-SQL? Unless you are you don't need to include all the modules. For example, if you are using MySQL 5 (or Mariadb) then you could simply use dub build --config=MySQL. The ODBC code is going to need some changes to get it all working with dmd > 2.096, see #96

D as a language is fine but it has a relatively small user base. This makes it tough to get contributors to projects such as this one. It's very frustrating to me as I'd like to use it more but I've ended up spending more time contributing to ddbc, hibernated, mysql-native, and the Intellij D Language plugin than I have working on my own D code.