digitalmars.D - Re: Database connection...
- Nahon <lburger hu.tesco-europe.com> Oct 30 2006
- "JC" <johnch_atms hotmail.com> Oct 30 2006
Nahon wrote:Hi. (Sadly) I have to connect to a *MSSQL* database in my program. I browsed the net quite a lot to find a D library (or sg.) that could do it. (I've found a connector form MySQL and a few others but not MSSQL.) Could someone help me about sending an URL for one or a module of own? Thank you.
Assuming you are comfortable with the windows api for odbc, the api headers are here: http://www.prowiki.org/wiki4d/wiki.cgi?WindowsAPI. Which will link you to the dsource repository.
The dbi module collection would be great (although I wanted to avoid ODBC), but I've downloaded it and unpacked to dmd/src/phobos/dbi. Then in my program I added the line import dbi.odbc.odbcdatabase; //and tried dbi.odbc.all as well then wanted to create a new database object: OdbcDatabase x = new OdbcDatabase(); When linking I get these error messages: #myprg.obj(myprg) # Error 42: Symbol Undefined __Class_3dbi4odbc12OdbcDatabase12OdbcDatabase #myprg.obj(myprg) # Error 42: Symbol Undefined _D3dbi4odbc12OdbcDatabase12OdbcDatabase5_ctorFZC3dbi #4odbc12OdbcDatabase12OdbcDatabase #--- errorlevel 2 If I don't want to create a new instance (OdbcDatabase x;) it's fine but cannot be used. What have I done wrong?
Oct 30 2006
"Nahon" <lburger hu.tesco-europe.com> wrote in message news:ei4giu$i7c$1 digitaldaemon.com...The dbi module collection would be great (although I wanted to avoid ODBC), but I've downloaded it and unpacked to dmd/src/phobos/dbi. Then in my program I added the line import dbi.odbc.odbcdatabase; //and tried dbi.odbc.all as well then wanted to create a new database object: OdbcDatabase x = new OdbcDatabase(); When linking I get these error messages: #myprg.obj(myprg) # Error 42: Symbol Undefined __Class_3dbi4odbc12OdbcDatabase12OdbcDatabase #myprg.obj(myprg) # Error 42: Symbol Undefined _D3dbi4odbc12OdbcDatabase12OdbcDatabase5_ctorFZC3dbi #4odbc12OdbcDatabase12OdbcDatabase #--- errorlevel 2 If I don't want to create a new instance (OdbcDatabase x;) it's fine but cannot be used. What have I done wrong?
This usually happend when you've not added the source files to the command line.
Oct 30 2006