Hi everyone,
I am working on some tool. Now I want to store records in some
file.
1) Are there some examples I can look at ?
2) Is it better to write fast data access routines (and creating the file in code) instead of using a ODBC connection to some database ?
Thanks guys
I am working on some tool. Now I want to store records in some
file.
1) Are there some examples I can look at ?
2) Is it better to write fast data access routines (and creating the file in code) instead of using a ODBC connection to some database ?
Thanks guys
it depends on the complexity of actions you wish to perform on your data :)
do you need options that a database gives (e.g. searching for connections between data, replication, multiple clients, client -server,...) or will a flat sequential file do?
As for databases you can use ADO, it can ease your database programming a lot usually, but it won't necessarily be easier to use from asm then ODBC (given that it's COM).
So the question is: What kind of operations do you need to perform on your data and in what context?
do you need options that a database gives (e.g. searching for connections between data, replication, multiple clients, client -server,...) or will a flat sequential file do?
As for databases you can use ADO, it can ease your database programming a lot usually, but it won't necessarily be easier to use from asm then ODBC (given that it's COM).
So the question is: What kind of operations do you need to perform on your data and in what context?
So the question is: What kind of operations do you need to perform on your data and in what context?
Hiroshimator,
The file is a local file. I would like to use some indexing system to read the file out. Because I want them in alphabetical order.
Hiroshimator,
The file is a local file. I would like to use some indexing system to read the file out. Because I want them in alphabetical order.
will it be a lot of data?
will it be largely read-only with little writes?
is that the only operation you wish to perform on it?
will it be largely read-only with little writes?
is that the only operation you wish to perform on it?
will it be a lot of data?
No, up to 100 records max.
1 record contains :
4 x a filename
1 x a text of 200 bytes
will it be largely read-only with little writes?
yes,
manually updating 1 by 1,
and reading the all the data out for generating .html from it.
No, up to 100 records max.
1 record contains :
4 x a filename
1 x a text of 200 bytes
will it be largely read-only with little writes?
yes,
manually updating 1 by 1,
and reading the all the data out for generating .html from it.
for the simple usage as you depict it I'd use a random access flat file.
Since it will be small, of specific size and limited in functionality it won't be hard to map or handle the records.
a memorymap will probably work best.
Since it will be small, of specific size and limited in functionality it won't be hard to map or handle the records.
a memorymap will probably work best.
OK,
Thanks for the advice Hiroshimator.
Thanks for the advice Hiroshimator.