Re: TZF - "Default Directory" & reindexing

Philip Kidder <[email protected]>
Newsgroups gmane.comp.lang.delphi.topaz
Message-ID <[email protected]>
Brian,

When you ChDir (DataDir) and set Active := true Topaz looks in the current
directory (DataDir) and opens the file. If you  FileName := DataDir +
FileName and then set Active := true Topaz will look in DataDir for the
file.

I don't remember the name of the procedures right now but they will parse
the filename and return the directory and the filename. This will give you
the filename for each time you run the procedure.

Phil Kidder

----- Original Message -----
From: "Brian" <[email protected]>
To: <[email protected]>
Sent: Monday, June 09, 2003 6:47 PM
Subject: RE: TZF - "Default Directory" & reindexing


> Thanks, but did not address my problem.
> (possibly due to my explanation of situation)
>
> The 'temp' DBF (DBF file on hard disk) is open & working OK.
>
> --> set ACTIVE = false
>
> --> delete the DBF & all associated files  (ie.  del   datafile.* )
>
> --> Get ZIP file (using FileOpenDialog - usually from Floppy or CD)
>
> --> unZIP the new version of the dbf (ie. replacing the above dbf file)
>       ( index not in ZIP )
>
> --> set dbf.CreateIndex = ciAlways
>
> --> set ACTIVE = true  (bingo, MakeIndex error)
>
> However, if I insert a  CHDIR(DataDir)  before the last step, all is OK
>
> I specifically do NOT want to have the DBF in the same directory as the
> application - local security issues - must use specified DataDir
>
> It appears that Topaz-MakeIndex is using the operating system "default
> directory" during the build of the Index as a temporary storage area.
>
> Is there a property that allows you to specify where such temporary
> working files are generated ( can Topaz be forced to use the current
> User's TEMP folder ?)
>
> Brian
>
> -----Original Message-----
> From: Philip Kidder [mailto:[email protected]]
> Sent: Saturday, 7 June 2003 6:42 AM
> To: [email protected]
> Subject: Re: TZF - "Default Directory" & reindexing
>
> Brian,
>
> I think the reason you are getting the MakeIndex error is the OpenDbf
> automatically creates the index whne it opens the file. Since your
> program
> canot write to the CD you get  the error. Turn off making the index.
> There
> was a discussion about that sometime ago and I don't remember how off
> the
> top of my head.
>
> When you add the database componet Topaz automatically includes the
> directory as part of the file name. If you clear the directory from the
> file
> name Topaz will look for the database in the current directory. Also,
> set
> the Active flag to false. Now you can add the directory string to the
> file
> name. When you set Active :=true the database will be opened in
> directory
> you want.
>
> Phil Kidder
>
>
> ----- Original Message -----
> From: "Brian" <[email protected]>
> To: <[email protected]>
> Sent: Thursday, June 05, 2003 7:53 PM
> Subject: TZF - "Default Directory" & reindexing
>
>
> > Have an app where I need to be able to save a subset of a database to
> a
> > CD or a floppy which can then be imported onto other computers
> >
> > Method
> > ------
> >   Export
> > Extract required data into a tmp DBF
> > ZIP the DBF
> > Save ZIP to floppy (or burn to a CD)
> >
> >   Import
> > Use FileOpenDialog to locate ZIP file
> > UNZIP the DBF
> > Set DBF to recreate Indexes
> > Open DBF                     <---  bingo MakeIndex ERROR
> >
> > NB If the ZIP is first copied to the hard disk, the problem does NOT
> > occur !
> >
> > Reason (after a couple of hours !!)
> > ------
> > The FileOpenDialog leaves the system "default directory" set to the
> > folder from which the last file was opened (in this case a floppy or
> CD)
> >    &
> > MakeIndex generates temp files during the reindex in this "default
> > directory"
> >
> > My Temp Workaround
> > ------------------
> > Manually change the default directory before doing the Open
> >
> > My question
> > -----------
> > Is there any way to tell Topaz to use a specific directory as its TEMP
> > working directory ??
> >
> >
> > Regards,
> >
> > Brian
> >
> >
> >
> >
> >
> >
>
>
>
>
>
>
>
>

==^================================================================
This email was sent to: [email protected]

EASY UNSUBSCRIBE click here: http://topica.com/u/?clvXPN.a5kvff.Z2NsZHQt
Or send an email to: [email protected]

TOPICA - Start your own email discussion group. FREE!
http://www.topica.com/partner/tag02/create/index2.html
==^================================================================
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.