🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.multi-tier
Article #1224

Re: Find Database in Directory

#1224
From: Brian Phillips
Date: Fri, 07 Apr 2000 00:00
51 lines
2869 bytes
---------------------------------------------------------
Hi Kim;
       I'm useing a Paradox database to start with.  I am 
writting a program that creats two output database files 
for every date that the users enter when running the program. 
In other words - A user will open the program and have to 
enter a date on the screen before they can do any data entry 
or run any reports.  When the users enters a date into the 
program one of two things must happen.  First I use the date 
to create the name of the two database files.  Then(and this 
is my big problem) I need to check the directory the program 
is in to see if the two database already exsist.  If they do 
exsist I will just activate the database files for user access. 
If they do not exsist I will create them and then activate the 
database files for user access.  
        I don't have a choice in the programs output because 
I'm repaceing someones exsisting program that is part of a 
larger system. So I need to create the same output files as 
the old DOS based program.
        I hope this clears up any confussion. If there is any 
help you can give me "Thank You!" very much.
                          Brian
-------------------------------------------------------------
Kim Hellan wrote:
 
 I'm not sure what you are trying to do......
Why are you operating on directories and not aliases? 
I assume that you are using BDE and aliases?
Are you trying to connect to a database or open a table?
What database are we talking about (Paradox, MS Access)?
 
Kim Hellan
 
"Brian Phillips" <bphillip@csc.sctboces.org> 

Here is what I want to do :

String tempDBFname;
tempDBFname = User input database name;
if ( tempDBFname = is in the current working directory )
    open exsisting database;
   else
     open new database called tempDBFname;

 I can't seem to get the code right for finding out if the 
'tempDBFname' in in the current working directory. I have 
been trying to get the libary function 
'FindDatabase(DatabaseName)'.  I was able to complile but 
no matter what my input I aways recieved the same results. 
For anyone could show me a working example or put me on a 
track that lead to another answer I thank you now!!!
Technical Details
Message-ID: <38EE16D5.3CF8@csc.sctboces.org>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <38ED19C9.539D@csc.sctboces.org> <8ck1ei$8ja3@bornews.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fcd2b,4b589a27a3623b4
X-Google-Attributes: gidfcd2b,public
From: Brian Phillips <bphillip@csc.sctboces.org>
Subject: Re: Find Database in Directory
Date: 2000/04/07
Message-ID: <38EE16D5.3CF8@csc.sctboces.org>
X-Deja-AN: 608005145
Content-Transfer-Encoding: 7bit
References: <38ED19C9.539D@csc.sctboces.org> <8ck1ei$8ja3@bornews.borland.com>
Content-Type: text/plain; charset=us-ascii
X-Trace: 7 Apr 2000 07:05:26 -0800, 204.249.116.67
Organization: SCT BOCES
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.database.multi-tier