BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

paradox and dbase needed files

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder Databases (Desktop)
View previous topic :: View next topic  
Author Message
Maileen
Guest





PostPosted: Sun Dec 07, 2003 1:47 am    Post subject: paradox and dbase needed files Reply with quote



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


Back to top
Dwayne
Guest





PostPosted: Wed Dec 10, 2003 4:38 pm    Post subject: Re: paradox and dbase needed files Reply with quote



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




Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder Databases (Desktop) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.