Using a MyBase XML DB instead of a Paradox DB
Posted on 2001-08-15
I have a simple paradox database with three tables in a master/detail relationship. I would like to use the MyBase XML facility in Delphi 6 instead of Paradox (which means I no longer need to install it - yay!).
The database is unlikely to ever get big enough that the in-memory nature of the XML tables will be a problem (or more to the point, the capacity of machines will grow much faster than the database ever will!).
What I am after is how to take this existing DB, which is acccessed by SQL statements to do all the necessary operations on it, and convert it to using TClientDatasets instead of the paradox tables.
In particular, I have SQL statements that creates a table, adds a record to it, deletes a record etc. I would like to be able to do all of this in a way that is similar, if not the same, as I currently do.
For instance, here is my code for creating one of the tables:
// Create the styles table
if not FileExists(DataTableLocation+'Styles.db') then
with TQuery.Create(Nil) do
SQL.add(format('CREATE TABLE "%sStyles.db"', [DataTableLocation]));
SQL.add('PRIMARY KEY (CUSTOMERID, STYLEDATE)');
I have had a look at the MyBaseExplorer demo, but it doesn't really go where I would like to go.