Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which is the best method to save data in Delphi

I work on a program in Delphi that holds a lot of data, and I wonder which method is the best to save it to file. Now we use records and "file of" to save it but I think it should be better methods. I would prefer a system that makes it easy to migrate from the system we use now.

EDIT: The application is a sort of a database application. The user use it to manage data.

like image 620
Sindre Johansen Avatar asked Dec 10 '22 22:12

Sindre Johansen


2 Answers

It depends on the data! Common means are databases (rows of lots of records), XML (structured data storage), ini files (simple data) or custom formats (graphic images etc). Delphi is very good with databases, with a range of third party options to allow fully compiled-in code, so for general data they will work well.

like image 76
mj2008 Avatar answered Dec 24 '22 01:12

mj2008


There are many options. If you're sure you will never need more then one user, I would go for ClientDatasets saved in XML. Dan Miser has written a few articles about them that are really good. If you are not sure you will need one or more users in the future I would go for an embedded database. Firebird is a good option for that. See http://www.firebirdsql.org/manual/fbmetasecur-embedded.html for more information. With the same code you will be able to make a Multi user version in the future.

like image 31
bartvdpoel Avatar answered Dec 24 '22 00:12

bartvdpoel