Board index » delphi » New database in delphi

New database in delphi

I've played around some with trying to do this is delphi 1.0.  It seemed
to me the only way to create a database is in design mode - then the
programs can manipulate the pre-existing database.  My attempts to work
around this involved creating a 'template database' - files that look
like program utility files to the user (.dat or something like that),
then copying them to temp.db or something like that within the program,
using temp.db for manipulation, then a save database command copies
temp.db to destination.db (or simply rename temp.db if you're finished
manipulating the db.  It can get really trick if you need to manipulate
more than 1 db at a time (i.e. compare, xref two of same type or work
with 2 or more unrelated db types) and that drove me crazy.  If anyone
has any better ideas for doing this sort of thing I'd like to know about
it too.  It would also seem, then, impossible to use delphi to create a
program that lets the user design and create db s dynamically.
 

Re:New database in delphi


Quote
David Saylor wrote:

> I've played around some with trying to do this is delphi 1.0.  It seemed
> to me the only way to create a database is in design mode - then the
> programs can manipulate the pre-existing database.  My attempts to work
> around this involved creating a 'template database' - files that look
> like program utility files to the user (.dat or something like that),
> then copying them to temp.db or something like that within the program,
> using temp.db for manipulation, then a save database command copies
> temp.db to destination.db (or simply rename temp.db if you're finished
> manipulating the db.  It can get really trick if you need to manipulate
> more than 1 db at a time (i.e. compare, xref two of same type or work
> with 2 or more unrelated db types) and that drove me crazy.  If anyone
> has any better ideas for doing this sort of thing I'd like to know about
> it too.  It would also seem, then, impossible to use delphi to create a
> program that lets the user design and create db s dynamically.You are absolutely wrong.  Look at the CreateTable procedure of TTable.

Other Threads