Lazarus

Programming => Databases => Topic started by: rcmz on July 31, 2021, 07:28:13 pm

Title: connecting to mssql server
Post by: rcmz on July 31, 2021, 07:28:13 pm
hello to all,

I searched the forum for this question and did not find anything helpful.  :(

How can I connect to mssql server ?  %)

TIA
Ramiro
Title: Re: connecting to mssql server
Post by: nouzi on August 01, 2021, 02:29:05 am
Use zeosdb
Title: Re: connecting to mssql server
Post by: rcmz on August 01, 2021, 05:09:30 am
thx,

do you have a sample project ?

TIA
Ramiro
Title: Re: connecting to mssql server
Post by: LacaK on August 03, 2021, 07:54:46 am
To connect to MS SQL Server you can use either:
both components are placed on sqlDB tab in Lazarus IDE
Title: Re: connecting to mssql server
Post by: dseligo on August 03, 2021, 10:14:37 am
do you have a sample project ?

I also use ZeosDBO for MSSQL. Put TZConnection on form or data module, set database, hostname, protocol and user properties in Object inspector. For protocol I use 'FreeTDS_MsSQL>=2005'. You'll also need library dll (try here: https://sourceforge.net/projects/zeoslib/files/3rd%20party/FreeTDS/ (https://sourceforge.net/projects/zeoslib/files/3rd%20party/FreeTDS/)).

Then set Connected property to true - if there are no errors you are connected.
TinyPortal © 2005-2018