Recent

Author Topic: connecting to mssql server  (Read 4320 times)

rcmz

  • New Member
  • *
  • Posts: 30
connecting to mssql server
« 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

nouzi

  • Full Member
  • ***
  • Posts: 229
Re: connecting to mssql server
« Reply #1 on: August 01, 2021, 02:29:05 am »
Use zeosdb
my english is  bad
Lazarus 2.0.6 free pascal 3.0.4
Lazarus trunk  free pascal trunk 
System : linux mint 19.3 64bit  windows 7 64bit

rcmz

  • New Member
  • *
  • Posts: 30
Re: connecting to mssql server
« Reply #2 on: August 01, 2021, 05:09:30 am »
thx,

do you have a sample project ?

TIA
Ramiro

LacaK

  • Hero Member
  • *****
  • Posts: 637
Re: connecting to mssql server
« Reply #3 on: August 03, 2021, 07:54:46 am »
To connect to MS SQL Server you can use either:
  • native TMSSQLConnection
  • or TODBCConnection
both components are placed on sqlDB tab in Lazarus IDE

dseligo

  • Sr. Member
  • ****
  • Posts: 344
Re: connecting to mssql server
« Reply #4 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/).

Then set Connected property to true - if there are no errors you are connected.

 

TinyPortal © 2005-2018