Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 6 of 6 total |
Database Table not in Catalog |
Thu, Feb 13 2020 5:55 AM | Permanent Link |
Teco TECHNOLOG Systems GmbH | Hi, I am creating a database inside an application.Database and table are created, but the tables are not shown in the Catalog with the ElevateDB Manager.
Example how I create Table and Database below. Any idea why the Table is not shown in the Manager but accessible? dbdir1 := appdir1 + 'db\'; Form1.EDBEngine1.Active := false; Form1.EDBEngine1.ConfigName := 'econfig';; Form1.EDBEngine1.ConfigPath := dbdir1; Form1.EDBEngine1.CharacterSet:=csUnicode; Form1.EDBEngine1.EncryptionPassword:=edbpassword;; Form1.EDBEngine1.Active := true; form1.Memo1.Lines.Add('EDB Version: '+form1.EDBEngine1.EngineVersion); Form1.EDBSession1.Connected:=false;; Form1.EDBSession1.LocalConfigName:='econfig'; //Form1.EDBSession1.LocalConfigExtension:='.ecat'; Form1.EDBSession1.LoginUser:='Administrator'; Form1.EDBSession1.LoginPassword:='EDBDefault'; Form1.EDBSession1.CharacterSet:=csUnicode; Form1.EDBSession1.LocalEncryptionPassword:=edbpassword; Form1.EDBSession1.LocalCatalogName:='ecatalog'; Form1.EDBSession1.LocalConfigPath := dbdir1; Form1.EDBSession1.SessionName:='EDBSession1'; Form1.EDBSession1.Connected:=true; Form1.EDBSession1.Execute('create database "Testdata1" Path '''+dbdir1+''' Description ''Testdatabase from Application'''); Form1.EDBDatabase1.Connected:=false; Form1.EDBDatabase1.Database:='Testdata1'; Form1.EDBDatabase1.DatabaseName:='test1'; Form1.edbdatabase1.Sessionname :='EDBSession1'; Form1.EDBDatabase1.Connected:=true; Form1.EDBDatabase1.Execute('Create Table "Table1" ("ID" INTEGER GENERATED ALWAYS AS IDENTITY (Start with 0, increment by 1), "Name" Varchar(1000) collate "UNI_CI", "Numbers" Integer)'); for i :=0 to 100 do begin Form1.EDBDatabase1.Execute('Insert into "table1" values (NULL, ''Name'',1)'); end; |
Thu, Feb 13 2020 7:51 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Teco
Have you set up the session / database inside EDBManager? EDBManager is "just" another ElevateDB application and can't magically guess that you've created a database and some tables in another application. Roy Lambert |
Thu, Feb 13 2020 8:07 AM | Permanent Link |
Teco TECHNOLOG Systems GmbH | Hi Roy,
I had set up the session in the EDBManager and then deleted the files on the hard disk and recreated them via application. Users are existing, Databases also, but the tables are not. Can I import an existing config to the EDBManager? I found only options to open SQL Files. Thank you. Teco Roy Lambert wrote: Teco Have you set up the session / database inside EDBManager? EDBManager is "just" another ElevateDB application and can't magically guess that you've created a database and some tables in another application. Roy Lambert |
Thu, Feb 13 2020 8:30 AM | Permanent Link |
Raul Team Elevate | On 2/13/2020 8:07 AM, Teco wrote:
> I had set up the session in the EDBManager and then deleted the files on the hard disk and recreated them via application. > Users are existing, Databases also, but the tables are not. > Can I import an existing config to the EDBManager? I found only options to open SQL Files. Then it looks like your EDBManager is not pointing to the same exact config as your app. Note that table technically only exists in config (schema etc) - the actual on disk table is only created when you add some data and just represents storage. Looking at your previous post you seem to be setting some of the session Local* properties (like LocalCOnfigPath) but i don't see you setting engine UseLocalSessionEngineSettings to true there so you might be using engine settings still. In general you can set the config on engine level and have sessions inherit it all and i personally think that is lot easier. You can manage this on session level but that's usually not needed IMHO unless you have some very special requirements Raul |
Thu, Feb 13 2020 10:27 AM | Permanent Link |
Teco TECHNOLOG Systems GmbH | Dear Raul,
Thank you for the information. With the setting "UseLocalSessionEngineSettings" the EDBManager shows all tables. Just to know: Where are these information stored if engine settings are used? Thank you. Teco Raul wrote: On 2/13/2020 8:07 AM, Teco wrote: > I had set up the session in the EDBManager and then deleted the files on the hard disk and recreated them via application. > Users are existing, Databases also, but the tables are not. > Can I import an existing config to the EDBManager? I found only options to open SQL Files. Then it looks like your EDBManager is not pointing to the same exact config as your app. Note that table technically only exists in config (schema etc) - the actual on disk table is only created when you add some data and just represents storage. Looking at your previous post you seem to be setting some of the session Local* properties (like LocalCOnfigPath) but i don't see you setting engine UseLocalSessionEngineSettings to true there so you might be using engine settings still. In general you can set the config on engine level and have sessions inherit it all and i personally think that is lot easier. You can manage this on session level but that's usually not needed IMHO unless you have some very special requirements Raul |
Thu, Feb 13 2020 3:15 PM | Permanent Link |
Raul Team Elevate | On 2/13/2020 10:27 AM, Teco wrote:
> Dear Raul, > > Thank you for the information. With the setting "UseLocalSessionEngineSettings" the EDBManager shows all tables. > Just to know: Where are these information stored if engine settings are used? Hi Teco, The schema, tables, users etc are always stored in the catalog so the key is to specify how its is found using config settings. In your own app you normally use single catalog so can just use the local engine instance to set all the settings and then you do not have to specify the local* version of the settings for each session - they will simply inherit it from engine. However sometimes you might want different sessions in same app to have completely independent settings - for example EDBManager is such an app - where you can have multiple configurations mixed with multiple sessions. In this case you want local setting to override engine ones. In EDBManager once engine UseLocalSessionEngineSettings is set to true one can configure each session with it's own unique settings connecting to different config paths (and catalogs). Not sure if this answers - please let me know Raul |
This web page was last updated on Sunday, May 19, 2024 at 08:46 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |