2017/12/08

How to set dbExpress ODBC ConnectionString property and TLS support


New ODBC driver for dbExpress in XE2.

You can setting DSN in Data Source (ODBC).

If you want create DSN-less connection, you can to setup ConnectionString in TSQLConnection.params.

The connection string like below:

MS Access

VendorLib=odbcjt32.dll;DRIVER={Microsoft Access Driver (*.mdb)};DBQ=Your.mdb;DriverId=25;FIL=MS Access;MaxBufferSize=2048;PageTimeout=17;coSafeMode=1

=== 2021/10/25 update ====

SQL SERVER

Standard Security with OleDB

ConnectionString=DRIVER={SQL Server};SERVER=HOST_NAME;DATABASE=DB_NAME;UID=USER_NAME;PWD=PASSWORD;

Standard Security with OleDB and Enable MARS

ConnectionString=DRIVER={SQL Server};SERVER=HOST_NAME;DATABASE=DB_NAME;UID=USER_NAME;PWD=PASSWORD;MultipleActiveResultSets=True

Standard Security with SQL Server Native Client 10

ConnectionString=DRIVER={SQL Server Native Client 10.0};SERVER=HOST_NAME;DATABASE=DB_NAME;UID=USER_NAME;PWD=PASSWORD;

Standard Security with SQL Server Native Client 11

ConnectionString=DRIVER={SQL Server Native Client 11.0};SERVER=HOST_NAME;DATABASE=DB_NAME;UID=USER_NAME;PWD=PASSWORD;

Standard Security with SQL Server Native Client 11 and Enable MARS

ConnectionString=DRIVER={SQL Server Native Client 11.0};SERVER=HOST_NAME;DATABASE=DB_NAME;UID=USER_NAME;PWD=PASSWORD;MARS_Connection=yes;

Standard Security with Azure SQL

DriverName=Odbc
IsolationLevel=ReadCommitted
RowSetSize=20
ConnectionString=DRIVER={SQL Server};
SERVER=SERVERNAME.database.windows.net;DATABASE=DB_NAME;UID=USER_NAME;PWD=PASSWORD;


MSSQL driver for dbExpress support TLS protocol with SQL SERVER 2008 and 2008 R2

SQL Server 2008

  1. Install and update to 2008 SP4
  2. Install KB4057114

SQL Server 2008 R2

  1. Install and update to 2008 R2 SP3
  2. Install KB4057113

上述步驟可以賦予 SQL Server 2008/2008 R2 以及「sqlncli10.dll」支援 TLS 加密通訊能力,如此便能使用它連接更高版本的 SQL Server,同時也讓 MSSQL for dbExpress (dbxmss.dll) 可以繼續使用,皆大歡喜!


和你分享 😉

See also

沒有留言:

張貼留言