Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 10 of 11 total |
Deployment.. |
Thu, Jun 7 2018 4:33 PM | Permanent Link |
Ian Branch | Hi Team,
OK. I have everything working on my Dev PC. I copied all Apps, Data (including populated tables and .Cat file), and relevant support files to a directory on my test Server. Ran my Config App that sets the ConfigFilePath and TempTablePath in a .ini file for the Apps but can't connect to the database. I suspect I have to do something with the .cfg file att but not sure what or how. Or, there is something else I need to do? Regards & TIA, Ian |
Thu, Jun 7 2018 4:35 PM | Permanent Link |
Ian Branch | Should have mentioned - Local mode only att.
|
Thu, Jun 7 2018 4:57 PM | Permanent Link |
Ian Branch | OK. Confirmed I need to set the 'Database Folder' in the .cfg file.
How do I access/set this in the .cfg file please? Regards & TIA, Ian |
Thu, Jun 7 2018 11:05 PM | Permanent Link |
Ian Branch | Some progress. Maybe.
Found that the relevant info is in Configuration.Databases. So I thought I would try something like this to see if the database path could be updated.. {delphi code} sSQLString := 'Update configuration.databases set Path = ''X:\DBiApps\Data'''; with DBS1 do Execute(sSQLString); {code} When run I get the following error.. "ElevateDB Error #1000 An error occurred with the cursor databases (An attempt was made to update a read-only cursor)." So close. The obvious next question is how to un read-only it. |
Thu, Jun 7 2018 11:13 PM | Permanent Link |
Steve Gill | Hi Ian,
Try ALTER instead of UPDATE. https://www.elevatesoft.com/manual?action=viewtopic&id=edb2sql&topic=ALTER_DATABASE = Steve |
Thu, Jun 7 2018 11:33 PM | Permanent Link |
Ian Branch | Hi Steve,
Yes, trying that att. {code} sSQLString := 'Alter database "DBiApps" Path ''X:\DBiApps\Data'''; with DBS1 do Execute(sSQLString); {code} I guess I am a little closer. I now get the following.. "ElevateDB Error #300 Cannot lock the database DBiWorkflow for exclusive access." Regards, Ian |
Fri, Jun 8 2018 1:10 AM | Permanent Link |
Ian Branch | Got rid of the TEDBDatabase component. Wasn't used anyway.
Final code... {code} DBE1.Close; sSQLString := 'Alter database "DBiApps" Path ''X:\DBiApps\Data'''; DBS1.Execute(sSQLString); {code} Regards, Ian |
Fri, Jun 8 2018 2:22 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Ian
Do you have any of the database components Active set to True. If so that was the problem. I use GExperts (Configuration | Set Component Properties) to make sure things are set properly (Active := False & Connected := False) for the engine, session, database, tables & queries You also have this https://www.elevatesoft.com/manual?action=viewprop&id=edb2&product=rsdelphiwin32&version=10T&comp=TEDBEngine&prop=StoreActive For information this is what I do in the datamodule oncreate procedure Tdm.DataModuleCreate(Sender: TObject); var sl: TStringList; begin TfREngine.BufferedFileIO := True; TfREngine.Signature := Copy(Digest(156), 1, 10); TfREngine.TempTablesPath := GetWindowsTempPath; edbParams.Sig := TfREngine.Signature; edbParams.TempPath := TfREngine.TempTablesPath; SetLocalRemoteDetails(TfRSession); end; procedure SetLocalRemoteDetails(WhichSession: TEDBSession); begin WhichSession.ExcludeFromLicensedSessions := True; WhichSession.LocalTempTablesPath := edbParams.TempPath; if edbParams.IsRemote then begin WhichSession.SessionType := stRemote; WhichSession.RemoteEncryptionPassword := edbParams.Encryption; WhichSession.RemotePort := 12010; WhichSession.RemoteSignature := edbParams.Sig; WhichSession.RemoteAddress := ''; WhichSession.RemoteHost := edbParams.ConfigPath; WhichSession.RemoteEncryption := True; WhichSession.RemotePing := True; WhichSession.RemotePingInterval := 20; end else begin WhichSession.SessionType := stLocal; WhichSession.LocalSignature := edbParams.Sig; WhichSession.LocalConfigPath := edbParams.ConfigPath; WhichSession.LocalEncryptionPassword := edbParams.Encryption; end; end; and my dpr file has this var sl: TStringList; cFound: boolean; aPath: string; begin // Application.ModalPopupMode := pmExplicit; IsMultiThread := True; edbParams.IsRemote := False; DisableProcessWindowsGhosting; // this isn't needed in the IDE only outside it {$IFDEF TFRDEV} if DebugHook <> 0 then begin ReportMemoryLeaksOnShutdown := True; SetMMLogFileName(PChar('Z:\Leaks\TfR.txt')); { 1. set TD32 on 2. enable the FullDebugMode compiler define in the FastMM4Options.inc file } end; {$ENDIF} aPath := IncludeTrailingPathDelimiter(ExtractFilePath(ParamStr(0))); if FileExists(aPath + 'TfR.ini') then begin sl := TStringList.Create; sl.LoadFromFile(aPath + 'TfR.ini'); if UpperCase(Copy(sl[0], 1, 5)) = '{C/S}' then begin edbParams.IsRemote := True; edbParams.ConfigPath := Copy(sl[0], 1 + Pos('}', sl[0]), MaxInt); cFound := True; end else begin cFound := FileExists(IncludeTrailingPathDelimiter(sl[0]) + 'EDBConfig.EDBCfg'); if cFound then edbParams.ConfigPath := IncludeTrailingPathDelimiter(sl[0]); end; sl.Free; end else cFound := False; {If can't find the ini file it MUST be F/S} if (not edbParams.IsRemote) and (not cFound) then begin cFound := FileExists(aPath + 'EDBConfig.EDBCfg'); if cFound then edbParams.ConfigPath := aPath; end; if not cFound then begin ConfigFinderForm := TConfigFinderForm.Create(nil); if ConfigFinderForm.ShowModal = mrOK then begin if ConfigFinderForm.PathFound <> '' then begin edbParams.ConfigPath := ConfigFinderForm.PathFound; cFound := True; end; end; ConfigFinderForm.Free; if cFound then begin sl := TStringList.Create; sl.Text := edbParams.ConfigPath; sl.SaveToFile(aPath + 'TfR.ini'); sl.Free; end; end; if cFound then begin Application.Initialize; Roy Lambert |
Sun, Jun 10 2018 6:44 PM | Permanent Link |
Ian Branch | Hi Roy,
Thanks Roy. My EDB skill/knowledge levels are nowhere near those you displayed. I am effectively only a Month old in the EDB world. I have managed to get 11 of the 12 Apps of the ADS project converted and operational and written a new support utility for it. The 12th App is an updater form changing/updating database structure 'in-the-field' using Data Definition Files sent to the Customer. Have to think around that one. No rush. I have done the bare bones Engine/Session/Database work to get the apps going in Local mode for testing by the Customer. Once everything is settled in Local mode I will settle down with a good scotch and do some deep study, then implement Remote/Server mode. ADS only had a 'Connection' to worry about for connectivity Regards, Ian |
Mon, Jun 11 2018 1:50 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Ian
>Thanks Roy. My EDB skill/knowledge levels are nowhere near those you displayed. Gained from much banging of head against wall I assure you >I am effectively only a Month old in the EDB world. >I have managed to get 11 of the 12 Apps of the ADS project converted and operational and written a new support utility for it. That's pretty impressive even though its "only" a database change. >The 12th App is an updater form changing/updating database structure 'in-the-field' using Data Definition Files sent to the Customer. Have to think around that one. No rush. The biggest problem is getting everyone off the system first - that doesn't change regardless of the database engine! As for the mechanics of it you can check version numbers at startup and apply SQL to make changes. I've vacillated between building something into the application and haveing stand alone facilities. I prefer the latter since it goes along nicely with GET OFF MY SYSTEM RIGHT NOW It also allows chunks of actual Delphi code to be used as well. When its not baked into a separate program and I'm just supplying sql code I generally UUEncode it - not very secure but its only to stop the morons. >I have done the bare bones Engine/Session/Database work to get the apps going in Local mode for testing by the Customer. Once everything is settled in Local mode I will settle down with a good scotch and do some deep study, then implement Remote/Server mode. ADS only had a 'Connection' to worry about for connectivity Pretty much the approach I took when I moved across from DBISAM. You'll find that moving from navigational methods to SQL or from ADS SQL to ElevateDB SQL a bigger challenge than moving from file/server to client/server. At least that's my experience. Roy |
Page 1 of 2 | Next Page » | |
Jump to Page: 1 2 |
This web page was last updated on Tuesday, May 7, 2024 at 06:25 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |