Subject | [IBO] Need help with updating methods |
---|---|
Author | Antti Kurenniemi |
Post date | 2005-07-29T14:46:39Z |
Hello all.
I am developing an app with Firebird (1.5) and IBO (4.5) and Delphi (2005),
and the development is so far going really nicely. But I need some help with
updating a database, which of course happens a lot during development.
So, how do you handle a case where there is data in a database, and the
database structure (tables) need to change (like, a new release of the
application needs some fields added and so on)? I'd like to program a method
that would allow my users to do this from my application, without having to
touch the Firebird server directly and without using command-line tools. I
was able to make a process where
1 - Dump all data into a file
2 - Create a new database using a script file containing the new structure
3 - Import data by reading the exported file and generating queries
... except for Blob fields, which I don't know how to put in a query. Also,
doing it all by myself felt like re-inventing the wheel which I would gladly
avoid if possible. I also thought about using the TIB_Datapump, with a
second database as the backup destination, but I don't really know how to
get the structure from the existing database. I'm also checking into Geoff
Worboys' DBak, which looks promising, except that I haven't yet figured out
if/how I can make it only restore data from the backup, and not the
structure.
Any and all ideas and information is welcome.
TIA,
Antti Kurenniemi
I am developing an app with Firebird (1.5) and IBO (4.5) and Delphi (2005),
and the development is so far going really nicely. But I need some help with
updating a database, which of course happens a lot during development.
So, how do you handle a case where there is data in a database, and the
database structure (tables) need to change (like, a new release of the
application needs some fields added and so on)? I'd like to program a method
that would allow my users to do this from my application, without having to
touch the Firebird server directly and without using command-line tools. I
was able to make a process where
1 - Dump all data into a file
2 - Create a new database using a script file containing the new structure
3 - Import data by reading the exported file and generating queries
... except for Blob fields, which I don't know how to put in a query. Also,
doing it all by myself felt like re-inventing the wheel which I would gladly
avoid if possible. I also thought about using the TIB_Datapump, with a
second database as the backup destination, but I don't really know how to
get the structure from the existing database. I'm also checking into Geoff
Worboys' DBak, which looks promising, except that I haven't yet figured out
if/how I can make it only restore data from the backup, and not the
structure.
Any and all ideas and information is welcome.
TIA,
Antti Kurenniemi