Page 1 of 1

How to connect to ms sql server?

Posted: 11.08.2024, 22:14
by RaelB
Hi,

Can someone explain how to connect to MS SQL Server?
I have selected mssql protocol, and filled in the other required fields (database name, user, pass, hostname). When I try to connect I get this error:
None of the dynamic libraries can be found or is not loadable: ntwdblib.dll, sybdb.dll !
I have a version of sql server installed on the pc as well as some odbc / oledb drivers (as in image below), however neither of the above 2 dlls are found on the pc.

Image

I am trying to connect to a sql server on the internet..

Thanks

Re: How to connect to ms sql server?

Posted: 12.08.2024, 08:28
by marsupilami
Hello RaelB and welcome to the forums :)

Zeos has several options for connecting to a MS SQL Server
  • Use the mssql driver: This driver uses FreeTDS to connect to SQL Server. Since you want to connect over the Internet, you most probably need TLS support. FreeTDS uses OpenSSL for TLS support. OpenSSL doesn't use the windows certificate store but expects a set of files in a standard location. Setting this up could be a small challenge. FreeTDS builds can be found in the Zeos download section and in the AppVeyor history for FreeTDS. FreeTDS builds by Zeos are done using MSYS2 and generally don't depend on DLLs that are not part of the zip file. AppVeyor builds depend on the Visual C++ Runtime. OpenSSL libraries are not part of the AppVeyor build artifacts.
  • Use the OLEDB or ODBC driver: These drivers are new in Zeos 8 and give better performance than the FreeTDS driver. They require you to install Microsoft OLEDB or ODBC drivers for SQL Server. Microsoft recommends these drivers as the official way to connect to SQL Server. To use one of these drivers just selet them and put a correct connection string in the database property of TZConnection.
  • The ADO driver: Zeos has a bridge for ADO. It still works but since ADO is deprecated by Microsoft, we also deprecated ADO in favor of OLEDB and ODBC. Basically it works like the OLEDB driver: Put the correct connection string in the database property and it should work.
I hope this helps,

Jan