On Wed, 27 Dec 2017 17:32:38 +0100, Bo Berglund via Lazarus <lazarus@lists.lazarus-ide.org> wrote:
>On Wed, 27 Dec 2017 14:05:55 +0000, Graeme Geldenhuys via Lazarus ><lazarus@lists.lazarus-ide.org> wrote: > >>You simply download the DLL and include it in the same directory as the >>EXE of your application, or install it to a global location like >>System32 directory. >> >> ftp://ftp.freepascal.org/fpc/contrib/windows/ >> > >I have tested this and no matter which of the included dll files in >the zip I put into my project directory I always get the exception: >I have downloaded zipfiles 0.95 and 1.00 > >Both of them contain: >Win32: > dblib_2000.dll > dblib_2008.dll > libiconv2.dll >Win64: > dblib.dll > dblib_2008.dll > libiconv.dll > I had to use BOTH the dblib.dll AND the libiconv.dll from Win64 dir... I had no idea I was building a 64 bit app.... But this was not enough, I also had to do the following: >constructor TSvnAuditer.Create; >begin > FConn := TMSSQLConnection.Create(nil); > FQuery := TSQLQuery.Create(nil); > FTrans := TSQLTransaction.Create(nil); > FConn.Transaction := FTrans; > FQuery.Transaction := FTrans; > FQuery.DataBase := FConn; InitialiseDBLib('dblib.dll'); <== Had to add this >end; And this required adding dblib to the uses clause. This last part was from a discussion I googled: http://www.pilotlogic.com/sitejoom/index.php/forum/forums-general/3849-cannot-open-tmssqlconnection-component which initially seemed to be about "CodeTyphon", whatever that is. But with these items in place I got a connection and could execute a query. -- Bo Berglund Developer in Sweden -- _______________________________________________ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus