prDirect reverting to prAuto

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
alphanull
Posts: 2
Joined: Thu 04 Dec 2014 00:57

prDirect reverting to prAuto

Post by alphanull » Thu 11 Dec 2014 00:56

I have a problem with direct mode not holding its value. I have set the components to prDirect but I still get a error. "Direct mode only supported" See below my analysis from your source code

MSClasses.PAS
const
DefaultInitMode = imReadWrite;
DefValProvider = prAuto;
DefValProviderCompact = prCompact;
DefValAuthentication = auServer;
DefaultTransactionCommitMode = cmAsynchCommit;
DefValForceCreateDatabase = True;
DefValApplicationIntent = aiReadWrite;

The problem here is the DefValProvider set to prAuto. This is somehow sticking on this value even though I set the TMSConnection control to prDirect. Any attempt to call the code below results in a ERROR Direct Mode Only Supported. SetProp(prProvider, Variant(DefValProvider)) is not remembering that I have set prDirect. I changed the default value to prDirect in your code to solve my problem, but that is not ideal if I need I different solution at a later time

MSConnectionString.pas
procedure TMSConnectionStringBuilder.InitOptions;
begin
inherited;
SetProp(prPort, DefaultSDACPort);
SetProp(prServer, '');
SetProp(prUsername, '');
SetProp(prProvider, Variant(DefValProvider)); Causes Error Direct Mode Only Supported
SetProp(prConnectionTimeout, DefValConnectionTimeout);
SetProp(prAuthentication, Variant(DefValAuthentication));
FIntegratedSecuritySSPI := False;
SetProp(prLanguage, '');
SetProp(prPersistSecurityInfo, DefValPersistSecurityInfo);

Hopefully a fix for this can be in the next build

Thanks for a great product

N. Thoresen
Software Integration and Design
Brisbane Australia

azyk
Devart Team
Posts: 1057
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

Re: prDirect reverting to prAuto

Post by azyk » Fri 12 Dec 2014 16:07

Thank you for the information. We have reproduced the problem and investigation is in progress. We will inform you when we have any results.

Post Reply