SDAC 8.1.7 problem with MSOLEDBSQL.1 in ConnectString

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Posts: 16
Joined: Fri 05 Nov 2004 11:47

SDAC 8.1.7 problem with MSOLEDBSQL.1 in ConnectString

Post by jabu » Wed 19 Sep 2018 10:12

I try use MSOLEDBSQL.1 in ConnectString (created in design mode where all is ok) in runtime

MSConnection1.ConnectString:= 'Provider=MSOLEDBSQL.1;Data Source= ...'

and got error message "Invalid connection parameter value: Provider=MSOLEDBSQL.1"

I have source code version of SDAC than I correct this problem in MSConnectionString.pas

function TCustomMSConnectionStringBuilder.ConvertStrToVar(Param: TConnectionStringParam; const Value: string): Variant;
s: string;
case Param.Code of
prProvider: begin
s := UpperCase(Value);
if (s <> SProviderTDS) and
(s <> SProviderSQLOLEDB) and
(s <> SProviderMSOLEDBSQL) and
(s <> SProviderNativeClient) and
(s <> SProviderNativeClient10) and
(s <> SProviderNativeClient11) and
(s <> SProviderCompact) and
(s <> SProviderCompact35) and
(s <> SProviderCompact40)
raise EConnectionStringError.CreateFmt(SInvalidConnectParamValue, [Param.Name, Value]);

Result := GetProvider(s);
Result := inherited ConvertStrToVar(Param, Value);

Please correct this for users who don't have the source code.

Regards, jabu

Devart Team
Posts: 248
Joined: Tue 03 Oct 2017 11:00

Re: SDAC 8.1.7 problem with MSOLEDBSQL.1 in ConnectString

Post by Stellar » Wed 19 Sep 2018 11:53

Thank you for the information. We have fixed the issue, and the fix will be included in the next SDAC build.

Post Reply