Welcome! Log In Create A New Profile

Advanced

GuenterP: [WD23] HFCS HCopyFile + warnings

Posted by harvey68 
GuenterP: [WD23] HFCS HCopyFile + warnings
September 09, 2018 10:03AM
Autor: GuenterP

Link zum Beitrag: [27130.foren.mysnip.de]

Hi,

in order to be able to painlessly switch from HFCS to Classic and back
I'm trying to backup a HFCS directory by HCopyFile(..) and copy back
these files to the HFCS Server. Using HCopyFile(...) to retrieve the
files from the server works just fine, no problem at all. But. Putting
those copied files back to the same server directory is a pain. There's
no way because a few files are always "in use" though these files are
closed by HClose(FileName) before a copy takes place. Any ideas?

BEWARE: using HBackup(YourConnection,"DataBaseName/*+System") will
backup the database plus the vital server files correctly. But. It will
NOT be able to restore anything of it! HFCS Control Center is unable to
restore the backup! Therefore do not use the "System" switch! Backup the
whole server directory from time to time.

BEWARE: the HFCS Control Center still cannot upload HF Classic files as
advertised except the logical and the physical file names are identical
AND the file extension of all files is .fic
GuenterP: [WD23] HFCS HCopyFile + warnings
September 09, 2018 10:04AM
Autor: GuenterP

Link zum Beitrag: [27130.foren.mysnip.de]

Hi,

HCopyFile(..) works just fine if a connection to a differently named
directory is opened. But now I have the data in a directory with the
"wrong" name. Only thing: I'd have to delete the original directory and
rename the newly made directory to that "old" name.

However, commands like HDeleteDirectory(...) and HRenameDirectory(...)
seem to be missing?? Is there any way to delete a Server directory and
is there another command to rename a directory? I couldn't find any ...
Piet van Zanten: [WD23] HFCS HCopyFile + warnings
September 09, 2018 10:04AM
Forum: WinDev Forum
Betreff: Re: [WD23] HFCS HCopyFile + warnings
Autor: Piet van Zanten
Link zum Beitrag: [27130.foren.mysnip.de]

Hi Guenter,

When I first started using Hyperfile, (in the previous century, even
before it was called HFSQL) I for some reason wanted to change the file
extension too. I felt it should be .dat or .dta.
As a result back then there were even more problems than you are facing
now.
Soon I realized that nobody would ever notice or care what the file
extensions look like and that it was not worth the trouble to change
them.
So I have been using .fic ever since.

For moving files back and forth between local and server I always use
HFSQL Control Center;
- Import Classical Database for import to the server
- Copy Files from server for a local copy of the file.
With both options I used a locally accessible BD directory of a HFSQL
Server as a local source or destination (Classical db).

I'm not sure if this is safe (no problems sofar), but if you just
physically change the name of a database folder on disk, then the db
name also changes in HFSQL Control Center. Adding an empty folder in the
BD folder will also add an empty db.
I'assuming that a database is the equivalent of a folder name in the BD
folder of the server.
If there's no _system folder after the copy, then you need to do a
synchronization of the data and structure afterwards.

Kind regards,
Piet
Ola: [WD23] HFCS HCopyFile + warnings
September 09, 2018 10:07AM
Autor: Ola

Link zum Beitrag: [27130.foren.mysnip.de]

Hi Guenter,

I also could not find a HRenameDirectory command (or anything
equivalent), but WD version 15 and newer ones do have the
HDeleteDirectory() command.

Best regards
Ola
GuenterP: [WD23] HFCS HCopyFile + warnings
September 09, 2018 10:07AM
Autor: GuenterP

Link zum Beitrag: [27130.foren.mysnip.de]

Hi Ola, thank you!

I did not see the command HDeleteDirectory(..), it islisted for C/S
only. That's a HUGE step forward! I could delete the directory BEFORE
copying the data files to the correctly named directory. I propose a
backup of the original data before doing the copy anyway!
GuenterP: [WD23] HFCS HCopyFile + warnings
September 09, 2018 10:09AM
Autor: GuenterP

Link zum Beitrag: [27130.foren.mysnip.de]

Hi Piet,

changing the extension from .fic to something else is a logical move.
The homophone "fick" to "fic" is in German the same as "f*ck" in
English. My first WD 5.5 program did have this extension and there were
several user questions in regards to this extension. "Are we going to be
f*cked by your program?" was one of the questions in regards to that
curiously named file extension. So, .DAT became the standard.

the use of different logical and physical file names is very practical!
I have a several - differently priced - programs which are addressing
the same audience. We can copy all the procedures and even windows from
one program to the other, add some fields and voila! there is a proven
and testeed part of the new program! To mask that from our customers and
keep them from inadvertently copying the wrong files around, they have a
different physical name on disk. Mostly using a prefix which points to
the program. Like OurProgA_CUSTOMERS and OurProgB_CUSTOMERS.

However, all of this is part of the Analysis and I'd really miss it in
case it wouldn't be there anymore! I cannot understand why PC Soft does
not follow their own rules in the HF CC. If they did not want their
users to have flexible file extensions and different physical names on
disk why the hell did they introduce those features in the Analysis?
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: