Mssql connection problem lazarus / 16-Databases ---------------------------------------------------------------------- sin_dragan · 2015-05-08 06:05 Hi, I m trying to connect to MSSql2012 remote server and I keep getting message that I m missing dblib.dll. Ive downloaded dblib (both 32 and 64) and put them to Syswow64, system32, laz_dir, project_dir but I can't connect. Same applies for ntwdblib.dll  On another computer I have installed 2012 and there works like a charm, so I guess it's some of the dll's. Does anybody knows which dll files I need to find? I m using 1.4.0 with 2.6.4 Win 7 64 trying to connect to WinServer2012 64Bit, using TMSSqlConnection. ---------------------------------------------------------------------- LacaK · 2015-05-08 07:35 Download ftp://ftp.freepascal.org/fpc/contrib/windows/dblib_current.zip and use all files in Win64 folder (if you compile your project for Win64 target!) - dblib.dll - libiconv.dll Compile you project and put these DLLs into same folder where you have EXE and run EXE (no need to put in in Syswow64, system32) ---------------------------------------------------------------------- sin_dragan · 2015-05-08 07:44 Hi, I tried to connect in designtime and I still get dblib.dll error message, I even tried to download sqlncli.msi and extract *.dll from it and use it. I can connect if I use sqldblibrary and load from there, then I can connect from IDE in designtime but when I compile I receive an error. If I compile with sqldbloader I get AV when run Exe with dll's in same directory. I use 32 bit setup. ---------------------------------------------------------------------- sin_dragan · 2015-05-08 08:14 I switched target to 64bit and follow LacaK's direction and it's working. EDIT: Strange, also with 64 bit setup I still receive dblib.dll error message when I try to connect from IDE. Back home (I m on my work comp now) I used 32 target to connect to server and everything was working fine. The only difference is that home I have 2012 sql express installed and on work 2008, so I'm guessing that some of the dll are missing. ---------------------------------------------------------------------- sin_dragan · 2015-05-08 09:29 Finally The solution for connecting from IDE was to put dlls in lazarus dir. Thx Lacak.