Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 7 of 7 total |
Configuration File |
Thu, Feb 7 2008 2:07 PM | Permanent Link |
Gleison Gibellato da Silva | Hi....
I'm using elevatedb in a project and I have one question. My application will open one database process the information and create a new database. The program it is working and I copy the information from one database to the other sem problem...... I have separted catalogs files, perfect..... My problem is the destination database will be deployed and I need also separated config files for that database, I didn't managet to generate that files, what I have at the end is two separates database on the same config files. On the application I have one engine component and two session components, I configured the session components point to different paths. Can you help me? |
Fri, Feb 8 2008 3:40 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Gleison
I don't know if it helps but here's what I'm doing for my data conversion. Path := IncludeTrailingBackslash(ExtractFilePath(Application.ExeName)); if FileExists(Path + 'edbmigratedbisam4.dll') then begin glProgress1.Visible := True; Memo1.Lines.Add('Converting to ElevateDB database format'); Memo1.Update; FilesToDelete(TfRLive, '*.EDB???'); // EDBTbl, EDBIdx, EDBblb if FileExists(Path + 'EDBConfig.EDBLog') then DeleteFile(Path + 'EDBConfig.EDBLog'); if FileExists(Path + 'EDBConfig.EDBCfg.Old') then DeleteFile(Path + 'EDBConfig.EDBCfg.Old'); if FileExists(Path + 'EDBConfig.EDBCfg') then DeleteFile(Path + 'EDBConfig.EDBCfg'); if FileExists(Path + 'EDBConfig.EDBLck') then DeleteFile(Path + 'EDBConfig.EDBLck'); with EDBSession do begin LocalConfigPath := Path; Users.Open; while not Users.Eof do begin try Execute('CREATE USER "' + Users.FieldByName('_ID').AsString + '" PASSWORD ' + QuotedStr(Decrypt(Users.FieldByName('_Check').AsString)) + ' DESCRIPTION ' + QuotedStr(Users.FieldByName('_Name').AsString)); Execute('GRANT "Administrators" TO "' + Users.FieldByName('_ID').AsString + '"'); except; end; Users.Next; end; Users.Close; Execute('CREATE MIGRATOR "DBISAM4" MODULE "edbmigratedbisam4" DESCRIPTION ''DBISAM 4 Migrator'''); Execute('CREATE DATABASE "' + CompanyCode.Text + '-Live" PATH ' + QuotedStr(TfRLive) + ' DESCRIPTION ' + QuotedStr(CompanyName.Text)); Execute('CREATE DATABASE "' + CompanyCode.Text + '-Archive" PATH ' + QuotedStr(TfRArchive) + ' DESCRIPTION ' + QuotedStr(CompanyName.Text + ' - Archived Data')); Execute('CREATE DATABASE "Memory" IN MEMORY'); end; with EDBDataBase do begin DatabaseName := CompanyCode.Text; Database := CompanyCode.Text + '-Live'; Execute('MIGRATE DATABASE FROM "DBISAM4" USING DatabaseDirectory = ' + QuotedStr(TfRLive) + 'WITH DATA'); end; with EDBSession do Execute('DROP MIGRATOR "DBISAM4"'); Roy Lambert |
Fri, Feb 8 2008 12:46 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Gleison,
<< My problem is the destination database will be deployed and I need also separated config files for that database, >> Do you mean you need two configuration files for two separate databases ? If so, then it's an easy fix: 1) Keep your application setup with the one engine component and two session components. 2) Using the first session component, make sure that the configuration file being referenced by the first session has the definition for the first desired database. If it has the additional database definition for the second database, then run this statement using the first session's Execute method: DROP DATABASE "MyDatabase" KEEP CONTENTS 3) Using the second session, make sure that the configuration file being referened by the second session has the definition for the second desired database. If not, use this statement to create it: CREATE DATABASE "MyDatabase" PATH 'c:\mydata' (replace the MyDatabase and path information with your own, of course . -- Tim Young Elevate Software www.elevatesoft.com |
Thu, Feb 14 2008 3:02 PM | Permanent Link |
Gleison Gibellato da Silva | Hi Tim
I think I did what you said, but I still have the same problem. I elaborate a simple sample that has the same problem. If you can give a look I believe that you will spot very easy the problem Thank you for your help Gleison "Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote: Gleison, << My problem is the destination database will be deployed and I need also separated config files for that database, >> Do you mean you need two configuration files for two separate databases ? If so, then it's an easy fix: 1) Keep your application setup with the one engine component and two session components. 2) Using the first session component, make sure that the configuration file being referenced by the first session has the definition for the first desired database. If it has the additional database definition for the second database, then run this statement using the first session's Execute method: DROP DATABASE "MyDatabase" KEEP CONTENTS 3) Using the second session, make sure that the configuration file being referened by the second session has the definition for the second desired database. If not, use this statement to create it: CREATE DATABASE "MyDatabase" PATH 'c:\mydata' (replace the MyDatabase and path information with your own, of course . -- Tim Young Elevate Software www.elevatesoft.com Attachments: uTestCreateDB.zip |
Fri, Feb 15 2008 4:17 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Gleison
I've had a quick look at your code 1. You need to set EDBEngine.UserLocatSessionEngineSessions to True 2. In the sql qrySource.SQL.ADD('DROP DATABASE Source KEEP CONTENTS'); - there is no database Source (I think you mean EDBSource) At this point I stopped. If you follow point 1 you should be able to debug the rest. Roy Lambert |
Fri, Feb 15 2008 6:32 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Gleison,
<< If you can give a look I believe that you will spot very easy the problem >> Roy is correct - if you set the TEDBEngine.UseLocalSessionEngineSettings property to True, it should correct your main issues: http://www.elevatesoft.com/scripts/manual.dll?action=mancompprop&id=edb1&product=d&version=7&comp=TEDBEngine&prop=UseLocalSessionEngineSettings -- Tim Young Elevate Software www.elevatesoft.com |
Fri, Feb 15 2008 1:09 PM | Permanent Link |
Gleison Gibellato da Silva | Thank you Tim.... you spot on...
The problem all the time was the UseLocalSessionEngineSettings "Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote: Gleison, << If you can give a look I believe that you will spot very easy the problem >> Roy is correct - if you set the TEDBEngine.UseLocalSessionEngineSettings property to True, it should correct your main issues: http://www.elevatesoft.com/scripts/manual.dll?action=mancompprop&id=edb1&product=d&version=7&comp=TEDBEngine&prop=UseLocalSessionEngineSettings -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Monday, April 29, 2024 at 05:23 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |