Page 1 of 1

Error on connection to a MS SQL server dblib.dll not found

Posted: 14.06.2021, 10:57
by Fernando
Hi
I try to connect to a Ms Sql Server using MSSqlConnection component. When i try to open, setting connected value to true, i receive this error "Can not load DB-Lib client library "dblib.dll". Check your installation". This message its clear and easy to understand, but my problem is that i unknow where this library must be and from where get this library, and in what route must be set, in Windows 10.

Any support will be appreciatted, thanks

Re: Error on connection to a MS SQL server dblib.dll not found

Posted: 14.06.2021, 12:37
by marsupilami
Hello Fernando,
Fernando wrote: 14.06.2021, 10:57 I try to connect to a Ms Sql Server using MSSqlConnection component.
This sounds like you are not using Zeos but another component suite (sqldb?).
Fernando wrote: 14.06.2021, 10:57 When i try to open, setting connected value to true, i receive this error "Can not load DB-Lib client library "dblib.dll". Check your installation". This message its clear and easy to understand, but my problem is that i unknow where this library must be and from where get this library, and in what route must be set, in Windows 10.
Usually you would want to use FreeTDS for this. You could use one of the downolads in our files section on sourceforge - although these libraries are a bit outdated. Besides this, you can download precompiled versions from the FreeTDS continous integration site.
See this thread: viewtopic.php?f=15&t=120103

Best regards,

Jan

Re: Error on connection to a MS SQL server dblib.dll not found

Posted: 14.06.2021, 17:30
by Fernando
Sorry Jan, you're right, I'm confused, it wasn't zeos, but sqldb. with ZEOS i also failed to connect to a Sql Server, te error was: "(path)client library ntwdblib.dll found but could not be loaded. Check compile-target and library compatibility.

Thanks for you help

Re: Error on connection to a MS SQL server dblib.dll not found

Posted: 14.06.2021, 20:25
by marsupilami
Hello Fernando,
Fernando wrote: 14.06.2021, 17:30 with ZEOS i also failed to connect to a Sql Server, te error was: "(path)client library ntwdblib.dll found but could not be loaded. Check compile-target and library compatibility.
That seems like you are building a 64 bits application. ntwdblib.dll never was distributed as a 64 bits dll. Also please don't use the ntwdblib.dll. Microsoft has discontinued development of ntwdblib.dll for almost 20 years now. Please use Freetds or ADO on Zeos 7.2. With Zeos 8.0 you also can use OLEDB and ODBC.

To use FreeTDS please set the LibraryLocation property of TZConnection to the full path of the library. Something like 'C:\Program Files\My Program\libsybdb-5.dll'.

Best regards,

Jan