Page 1 of 1
LocalDB
Posted: Mon 08 Dec 2014 10:27
by semike
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
Re: LocalDB
Posted: Tue 09 Dec 2014 15:46
by azyk
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'] := '';