Permalink
Browse files

Switch to Microsoft OLE DB Driver for SQL Server

SQLOLEDB provider is for deprecated Microsoft OLE DB Provider for SQL
Server, which is no longer supported.

See https://blogs.msdn.microsoft.com/sqlnativeclient/2017/10/06/announcing-the-new-release-of-ole-db-driver-for-sql-server/

Fixes #237
  • Loading branch information...
lipnitsk authored and ansgarbecker committed Apr 30, 2018
1 parent 54a7930 commit c749c061a5382886f00a70f69c010edfe0d51ac0
Showing with 2 additions and 2 deletions.
  1. +2 −2 source/dbconnection.pas
@@ -1859,7 +1859,7 @@ procedure TAdoDBConnection.SetActive(Value: Boolean);
QuotedPassword := ''''+Parameters.Password+''''
else
QuotedPassword := '"'+Parameters.Password+'"';
FAdoHandle.ConnectionString := 'Provider=SQLOLEDB;'+
FAdoHandle.ConnectionString := 'Provider=MSOLEDBSQL;'+
'Password='+QuotedPassword+';'+
'Persist Security Info=True;'+
'User ID='+Parameters.Username+';'+
@@ -1871,7 +1871,7 @@ procedure TAdoDBConnection.SetActive(Value: Boolean);
if (not Parameters.AllDatabasesStr.IsEmpty) and (Pos(';', Parameters.AllDatabasesStr)=0) then
FAdoHandle.ConnectionString := FAdoHandle.ConnectionString + 'Database='+Parameters.AllDatabasesStr+';';
if Parameters.WindowsAuth then
FAdoHandle.ConnectionString := FAdoHandle.ConnectionString + 'Integrated Security=SSPI;';
FAdoHandle.ConnectionString := FAdoHandle.ConnectionString + 'Trusted_Connection=yes;';
try
FAdoHandle.Connected := True;
FConnectionStarted := GetTickCount div 1000;

0 comments on commit c749c06

Please sign in to comment.