Board index » cppbuilder » paradox and dbase needed files

paradox and dbase needed files


2003-12-07 09:47:28 AM
cppbuilder16
Hi,
i'm writing a database application and i would like to know what are the
files needed if i'm using :
- a paradox 7 database (files like *.db, *.x03,*.y03, *.val,....)
- a visual dbase database (*.mdx, *.ndx, *.dbf)
in fact, i ask that because i would like to place these files on a CDROM and
if my application need to open another file (like *.ldb for *.mdb access
database), it will be impossible on CDROM.
PS : my application read just a database, we don't modify or save anything
in this database.
Alain
 
 

Re:paradox and dbase needed files

Maileen>>i'm writing a database application and i would like to know what
are the
files needed if i'm using :
- a paradox 7 database (files like *.db, *.x03,*.y03, *.val,....)
- a visual dbase database (*.mdx, *.ndx, *.dbf)
in fact, i ask that because i would like to place these files on a CDROM and
if my application need to open another file (like *.ldb for *.mdb access
database), it will be impossible on CDROM.
PS : my application read just a database, we don't modify or save anything
in this database.
<<
There are a couple of problems I see.
1. What version of the Dbase package are you using?
2. What indexes and how many Indexes are you using? (Primiary, secondary,
and so forth).
What you may want to do, is
1. write your program.
2. Create a directory on your hardrive called something like
"CDROM"
3. Direct all your data files there.
Then you will know what the data files are, and when your program is
done,
copy those datafiles to a CD and direct your program to the CD Drive.
You may want to use a file that has directional data. That way you
can change that file, and not
have to change your program... Like a INI file.
for example a INI file will have:
[DATA_FOR_MY_PROGRAM]
DataLocation="c:/cdrom/filename
IndexLocation="c:/cdrom/indexname
etc etc etc.
And to call it up it would look like:
AnsiString Buf1;
TIniFile* pif = new TIniFile("\\DATA_FOR_MY PROGRAM.ini"); (this assumes
root directory)
Buf1 = pif->ReadString("DATA_FOR_MY PROGRAM", "DataLocation", "none");
Form1->Filedata->Active=false;
Form1->Filedata->TableName=Buf1;
TIniFile* pif = new TIniFile("\\DATA_FOR_MY_PROGRAM.ini"); (this assumes
root directory)
Buf1 = pif->ReadString("DATA_FOR_MY PROGRAM", "IndexLocation", "none");
Form1->Filedata->IndexName=Buf1";
Form1->Filedata->Active=true;
delete pif;
And this will FAIL if the files are not truely there, because Buf1 will
have the file "none" in it.
This is only a quicky short example. It is not Dbase specific, so you
will have to modify it just a little bit.
to make sure you are putting the correct data in the correct fields.
But when you are over with it, you can change the direction of the
file locations when you are done, and not recompile your program to make the
changes.
Good Luck!
Dwayne