TOleDBMSSQLConnectionProperties驱动MSSQL数据库

TOleDBMSSQLConnectionProperties驱动MSSQL数据库

为了让MORMOT可以驱动所有版本的MSSQL,需要改用SQLOLEDB,因为所有的WINDOWS操作系统里面都提供了SQLOLEDB。

MORMOT1.18以上版本需要改SynOleDB.pas源码:

procedure TOleDBMSSQLConnectionProperties.SetInternalProperties;
begin
OnCustomError := MSOnCustomError;
if fProviderName='' then
// fProviderName := 'SQLNCLI10'; // 注释此行 by cxg
fProviderName := 'SQLOLEDB'; // 增加此行 by cxg
fDBMS := dMSSQL;
inherited SetInternalProperties;
if fUserID='' then
fConnectionString := fConnectionString+
'Integrated Security=SSPI;Persist Security Info=False;';
end;

原文地址:https://www.cnblogs.com/hnxxcxg/p/8045858.html