LocalDB

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for SQL Server in Delphi and C++Builder
Post Reply
semike
Posts: 7
Joined: Thu 15 Nov 2007 19:30

LocalDB

Post by semike » Mon 08 Dec 2014 10:27

Hello,

how can I connect to a LocalDB database using the dbExpress driver for SQL Server? I did not find any information about that.

Thank you in advance,
Michael

azyk
Devart Team
Posts: 1119
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

Re: LocalDB

Post by azyk » Tue 09 Dec 2014 15:46

To connect to LocalDB SQL Server using dbExpress driver for SQL Server, you have to install the SQL Native Client 11.0 provider. You should specify in the connection options that you are using SQL Native Client. For this, set the VendorLib parameter to 'sqlncli11' for the TSQLConnection.Params component, for example:

Code: Select all

  SQLConnection.Params.Values['VendorLib'] := 'sqlncli11';
In addition, you need to use Windows Authentication in the connection to LocalDB SQL Server. For this, set the User_Name and Password parameters to an empty value for TSQLConnection.Params, for example:

Code: Select all

  SQLConnection.Params.Values['User_Name'] := '';
  SQLConnection.Params.Values['Password'] := '';

Post Reply