Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General » View Thread |
Messages 1 to 5 of 5 total |
Help for ReadAdminSettings... |
Thu, May 17 2018 12:10 PM | Permanent Link |
Mesotech Mesotech | Hello,
I'm migratting a 4.26 delphi code to a 4.45 version… I've got a problem with ReadAdminSettings… For 4.26 I've this : ReadAdminSettings(const CurPath: string; const AppName: string; var AdminSettings: TAdminSettings); For 4.45 : procedure ReadAdminSettings(const VersionInfo: TVersionInfo; var AdminSettings: TAdminSettings); So in my old code I've got : PROCEDURE TDataModule1.Reconnect_OLD; Var DatabaseDescription, TempServerPath,FileNameRoot : string; AppAdminSettings: TAdminSettings; Begin WAY_MAIN_APPLICATION:=extractfilepath(Application.exename); DBISAMSession1.Active:=false; with DBISAMSession3 do begin Active:=false; Remoteuser:='Admin'; RemotePassword:='DBAdmin'; Remoteencryption:=true; ReadAdminSettings(WAY_MAIN_APPLICATION,FileNameRoot,AppAdminSettings); SetAdminSettings(DBISAMSession3,True,AppAdminSettings); Active:=true; ….. So in the new code I will use a TversionInfo : PROCEDURE TDataModule1.Reconnect_45; Var DatabaseDescription, TempServerPath,FileNameRoot : string; AppAdminSettings: TAdminSettings; vsf : Tversioninfo; Begin WAY_MAIN_APPLICATION:=extractfilepath(Application.exename); DBISAMSession1.Active:=false; with DBISAMSession3 do begin Active:=false; Remoteuser:='Admin'; RemotePassword:='DBAdmin'; Remoteencryption:=true; vsf.FileNameRoot:=FileNameRoot; ReadAdminSettings( vsf,FileNameRoot,AppAdminSettings); SetAdminSettings(DBISAMSession3,True,AppAdminSettings); Active:=true; … what parameters of Tversioninfo I must fill ? Do you have a sample code of uses of the ReadAdminSettings procedure please ? With best regards, Mesotech |
Thu, May 17 2018 2:13 PM | Permanent Link |
Mesotech Mesotech | Hello,
May be Just using tversioninfo without parameters is enough? With best regards, Mesotech |
Thu, May 17 2018 2:41 PM | Permanent Link |
Raul Team Elevate | On 5/17/2018 12:10 PM, Mesotech wrote:
> I've got a problem with ReadAdminSettings… I'm not really sure why you're using it at all but ok. > what parameters of Tversioninfo I must fill ? > Do you have a sample code of uses of the ReadAdminSettings procedure please ? ReadAdminSettings is in dbisamut.pas (utilcomps folder) and versioninfo is simply used to build the path to the ini file (GetIniFileName call) Raul |
Thu, May 17 2018 2:44 PM | Permanent Link |
Raul Team Elevate | On 5/17/2018 2:41 PM, Raul wrote:
> On 5/17/2018 12:10 PM, Mesotech wrote: >> I've got a problem with ReadAdminSettings… > > I'm not really sure why you're using it at all but ok. > >> what parameters of Tversioninfo I must fill ? >> Do you have a sample code of uses of the ReadAdminSettings procedure >> please ? > > ReadAdminSettings is in dbisamut.pas (utilcomps folder) and versioninfo > is simply used to build the path to the ini file (GetIniFileName call) Look at srvadmin source - it uses this Raul |
Thu, May 17 2018 3:14 PM | Permanent Link |
Mesotech Mesotech | Hello Raul,
Big thank you for your help. With best regards, Mesotech |
This web page was last updated on Saturday, May 4, 2024 at 12:54 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |