DDBI and MySQL

Don nospam at nospam.com.au
Fri Aug 29 00:54:11 PDT 2008


Chris R. Miller wrote:
> I've been working to attempt to get DDBI to work with MySQL.
> Unfortunately I'm stuck with the Windows platform for lack of the
> impetus and know-how to get the compiler working elsewhere.
> 
> I use a slightly modified version of DDBI to get SQLite to work.  I
> don't think that would disrupt the workings of MySQL.
> 
> Once I found the correct library file to use (buried in a large download
> of MySQL - the server, which was annoying) I found that the whole
> she-bang didn't work at all.  It was all tied to a strange external
> declaration in imp_win.d, which apparently decided that on Windows the
> MySQL support is provided by extern(Windows) instead of extern(C).

I hope you changed that to extern(System) ? It sounds like an old MySQL 
file.

> 
> Once I got that cleared up, I started a bunch of "cannot implicitly cast
> foo* to foo*" errors, which mystified me.  I think it's because one is
> tossing an alias of something to something that's expecting the
> un-aliased something, and so it's having some issues.
> 
> So attempting to fix the issues didn't work terribly well.  I beat
> through a few pointer issues to get hung up on a weird pointer issue
> which emits this error:
> 
> dbi\mysql\MysqlDatabase.d(194): constructor
> dbi.mysql.MysqlResult.MysqlResult.th
> is (st_mysql_res*) does not match parameter types (st_mysql_res*)
> dbi\mysql\MysqlDatabase.d(194): Error: cannot implicitly convert
> expression (cas
> t(st_mysql_res*)*results) of type st_mysql_res* to st_mysql_res*
> 
> I'm pretty puzzled.  I've tried casting it explicitly, and it doesn't
> work.  I'd really appreciate it if someone knew what is going on.  When
> I explicitly cast it, it still give the same error.
> 
> This is DMD version 1.033.
> 



More information about the Digitalmars-d mailing list