I kinda slapped one together but idk if it actually works.
https://github.com/adamdruppe/arsd
database.d and mssql.d from that repo. I haven't even tried to
compile it for a while though, so it might not work at all.
The way I made it was to write the extern(C) function
declarations and then call it like in C.
It didn't compile, says, "mssql.d(12): Error: module sql is in
file 'win32\sql.d' which cannot be read" and then lists the
import paths, of which none of them have the win32 directory.
Database.d was able to compile though.
Assuming you're using ODBC on Windows, here's an old port of an
even older C++ wrapper I used to use for ODBC work. It
includes an ODBC header and library, so should serve as a good
basis for whatever you're trying to do. If you're on Unix, you
may have to update the ODBC header a bit. I got partway
through that project back in the day but never finished:
http://invisibleduck.org/sean/tmp/sql.zip
I'll look into this, thanks for the example.