Database.e; db_select(); Can't make it work...
- Posted by ZNorQ <znorq at holhaug.com> Mar 26, 2007
- 722 views
I got a program that have 2 ".edb" files, and I'm trying to use db_select() to switch between the three. When the program starts, it checks to see if the 2 files exists, and if they don't - it creates them using the db_create(). Now, I thought that when using db_create() - this also acts as db_open() and keeps those databases open, and that I'm then able to use db_select() to switch between them. Example; <EuCode> sequence jStatus jStatus = {} -- jStatus &= db_select("c:\\Metadata.edb") jStatus &= db_create_table("TBL_DOCUMENTS") -- jStatus &= db_select("c:\\System.edb") jStatus &= db_create_table("IDX_DOCUMENTS") jStatus &= db_select_table("SYS_HEADINGS") jStatus &= db_insert("TBL_DOCUMENTS", "STR_DOC_NO", "STR_DOC_TITLE") jStatus &= db_select_table("SYS_AUTONUMBER") jStatus &= db_insert("TBL_DOCUMENTS", {"DOC" & "#", 1}) -- jStatus &= db_select("c:\\Metadata.edb") jStatus &= db_select_table("TBL_DOCUMENTS") </EuCode> What happens here is that 2 tables are created in "Metadata.edb", but the intention was that "TBL_DOCUMENTS" is created in "Metadata.edb", and "IDX_DOCUMENTS" is created in "System.edb".. Can anyone spot what I'm doing wrong? Kenneth / ZNorQ