Access MSSQL with Lazarus lazarus / 16-Databases ---------------------------------------------------------------------- claytonocn · 2024-09-19 19:05 Hello! I am a Delphi programmer and would like to migrate to Lazarus. I usually access MSSQL databases via ADO, using the components from the dbGO palette. I would like to know which component to use in Lazarus that allows me to connect to the server without having to install or configure anything on the client PC, as I already do in Delphi. Also, which component has the best performance and which components are compatible for compiling for Windows, Linux and Mac? Thank you! ---------------------------------------------------------------------- Zvoni · 2024-09-20 06:11 MSSQLConn in conjunction with FreeTDS https://www.freepascal.org/docs-html/current/fcl/mssqlconn/index.html https://wiki.freepascal.org/mssqlconn ---------------------------------------------------------------------- luca · 2024-09-20 07:55 Hi. I'm using ODBC connector (TODBCConnection). It gives the possibility to use the last ODBC driver version to connect to SQL Server and it's portable. You can configure the connection by using an external DSN file. In my project I started using MSSQL 2000 migrated recently to MSSQL 2022. Best Regards ---------------------------------------------------------------------- af0815 · 2024-09-21 16:33 As a Delphi developer, you can change to zeros, Wich is available for Delphi and Lazarus. After the Changes in Delphi, the change to Lazarus will be one point easier. ---------------------------------------------------------------------- dseligo · 2024-09-21 19:17 Quote from: af0815 on September 21, 2024, 06:33:16 pmzeros You mean ZEOS (https://wiki.freepascal.org/ZeosDBO), not zeros? ---------------------------------------------------------------------- af0815 · 2024-09-23 05:58 Quote from: dseligo on September 21, 2024, 09:17:36 pmQuote from: af0815 on September 21, 2024, 06:33:16 pmzeros You mean ZEOS (https://wiki.freepascal.org/ZeosDBO), not zeros? YES. It one of the easiest way to start a convertion, because you can try to start in Delphi and work later in Lazarus with Zeos. Because the ceaveats are normal the other used components, you have to figth against. If you use third party componnets without source and no support for freepascal you have to do a very hard way, to solve the situation. Often it is better to rewrite the software and use only codeparts of the 'old' application. This is IMHO sometimes easier and faster. Depending on the old code. ---------------------------------------------------------------------- nummer8 · 2024-09-23 08:58 Recently I had to connect to a MSSQL database. I started with ZEOS components icm with dblib.dll https://downloads.freepascal.org/fpc/contrib/windows/ At first I used the ADO protocol but had problems with statement timeouts. As a second atttempt I used oleDB protocol which had a variation in the connectionstring. But no problems if the statemanet took longer to produce a result. So my advise would also be ZEOS.