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
prDirect reverting to prAuto
Re: prDirect reverting to prAuto
Thank you for the information. We have reproduced the problem and investigation is in progress. We will inform you when we have any results.