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;

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-06
  • 2021-05-28
  • 2022-12-23
  • 2022-12-23
  • 2021-06-27
  • 2022-12-23
猜你喜欢
  • 2022-02-02
  • 2022-12-23
  • 2021-11-23
  • 2021-11-17
  • 2023-03-15
相关资源
相似解决方案