Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 3 of 3 total |
Create DB using code |
Wed, Oct 1 2008 7:12 PM | Permanent Link |
Pierre du Plessis | Good Day,
I'm sure this question has been answered, but I can't find it. Once a database has been reverse engineered, what's the best way to create the database(s) using code when the application are deployed, considering they may already exists? With DBISAM, I used the "IF NOT EXISTS" clause at a table/index level, and would like to accomplish more or less the same using EDB 2. Many thanks, Pierre |
Wed, Oct 1 2008 7:45 PM | Permanent Link |
"David Cornelius" | > I'm sure this question has been answered, but I can't find it. Once
> a database has been reverse engineered, what's the best way to create > the database(s) using code when the application are deployed, > considering they may already exists? With DBISAM, I used the "IF NOT > EXISTS" clause at a table/index level, and would like to accomplish > more or less the same using EDB 2. You'll need to query the Information database and the Tables table. For frequent usage, you'll probably want to write a function to do this so the resulting SQL could like this: IF NOT TableExists('TableName') THEN EXECUTE IMMEDIATE 'CREATE TABLE "TableName" ...'; END IF; For an example of this function, check out the thread in the extensions newsgroup with the subject "TableExists function." -- David Cornelius CorneliusConcepts.com |
Thu, Oct 2 2008 4:01 AM | Permanent Link |
Pierre du Plessis | Thanks David, this was helpful.
Best regards, Pierre |
This web page was last updated on Monday, May 6, 2024 at 03:23 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |