Page 1 of 1

SDAC 8.1.7 problem with MSOLEDBSQL.1 in ConnectString

Posted: Wed 19 Sep 2018 10:12
by jabu
Hello,
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;
var
s: string;
begin
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)
then
raise EConnectionStringError.CreateFmt(SInvalidConnectParamValue, [Param.Name, Value]);

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

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

Regards, jabu

Re: SDAC 8.1.7 problem with MSOLEDBSQL.1 in ConnectString

Posted: Wed 19 Sep 2018 11:53
by Stellar
Thank you for the information. We have fixed the issue, and the fix will be included in the next SDAC build.