ho to connect to MSSQL with ADO in Lazarus
Moderators: gto, cipto_kh, EgonHugeist
-
- Fresh Boarder
- Posts: 1
- Joined: 08.08.2018, 15:34
ho to connect to MSSQL with ADO in Lazarus
someone can help with this?
-
- Platinum Boarder
- Posts: 1956
- Joined: 17.01.2011, 14:17
Re: ho to connect to MSSQL with ADO in Lazarus
Hello
I assume that this works just like in Delphi. Set the protcol property to ADO and put the ADO connection string into the database property. The following example uses SQL Server with the SQL Server Native Client:
Best regards,
Jan
I assume that this works just like in Delphi. Set the protcol property to ADO and put the ADO connection string into the database property. The following example uses SQL Server with the SQL Server Native Client:
Code: Select all
//example:
ZConnection.Protocol := 'ado';
ZConnection.Database := 'Provider=SQLNCLI11.1;Initial Catalog=MyDatabase;Data Source=MyServer\MyInstance';
ZConnection.User := 'sa';
ZConnection.Password := 'MyPassword';
Jan
Re: ho to connect to MSSQL with ADO in Lazarus
Or maybe use ZEOS 7.3 svn 4888 and odbc_w (it will be much faster).
Then:
Driver = {SQL Server Native Client 11.0}; Server = servername; Database = master; Uid = user; Pwd = pass; MARS_Connection = yes
Michal
Then:
Driver = {SQL Server Native Client 11.0}; Server = servername; Database = master; Uid = user; Pwd = pass; MARS_Connection = yes
Michal