Welcome! Log In Create A New Profile

Advanced

WD - WDModFic file password?

Posted by infos 
WD - WDModFic file password?
July 15, 2021 11:57PM
Hello everyone

When modifying databases (WDModFic) it asks me for a file password. Where do I insert the password for the files in the code?

I tried to insert / FILEPWD = "password" into the code but to no avail. What should this code with the built-in password for files look like?

This is my code:

sWDModFicDirectory is string = CompleteDir(fExeDir())//fExeDir()  //mapa gdje se nalazi ModFic.exe
sFullWDDName is string = CompleteDir(fExeDir())+"INFOS.wdd"   //naziv analize
sUser is string = gsUser   //korisnicko ime
sPassword is string = gsLozinka  
sAddressOrNameHFServer is string = gsServer   //naziv servera
sPortNumHFServer is int = gsPort   //port
sDatabaseName is string = gsBaza   //naziv baze podataka
sFilePassword is string = gsFilePasword
sCommandLine is string
sCommandLine = StringBuild([
	"%1WDModFic.exe" /WDD="%2" /SERVER="%3:%4@%5:%6/%7" /FILEPWD="%8" -nolink 
], CompleteDir(sWDModFicDirectory), sFullWDDName, sUser, sPassword, sAddressOrNameHFServer, sPortNumHFServer, sDatabaseName, sFilePassword)
//Start automatske modifikacije
IF not ExeRun(sCommandLine, exeActive, exeWait) THEN
	Error("Ne može se izvršiti automatska izmjena podataka : ", ErrorInfo(), "naredbeni redak : ", sCommandLine)
ELSE
	ToastDisplay("Procedura nadogradnje je završena")
END

[infosonline.net]



Edited 2 time(s). Last edit at 07/15/2021 11:58PM by infos.
Al
Re: WD - WDModFic file password?
July 16, 2021 12:30AM
Hello Infos

HPass() can be used to create and remove a password for a nominated file or for all files

Regards
Al
Argus
Re: WD - WDModFic file password?
July 16, 2021 02:46AM
It has been many years now that the hmodifystructure instruction has been available, removing all need for wdmodfic and command line
Re: WD - WDModFic file password?
July 16, 2021 09:09PM
Thanks Argus

I haven't tried this HModifySructure method which really works great

Thank you

[infosonline.net]



Edited 1 time(s). Last edit at 07/16/2021 09:10PM by infos.
Re: WD - WDModFic file password?
July 17, 2021 07:44AM
Hi, yes, it works just fine, but

Caution: Links are not managed (no creation or update of existing links).

Kind regards,
Guenter Predl
office@windev.at
Re: WD - WDModFic file password?
July 17, 2021 09:46AM
Regards

Yes, that can be a problem.
Has anyone done adding or updating links by programming?

[infosonline.net]
Re: WD - WDModFic file password?
July 17, 2021 01:39PM
Greeting

Even though I specified the parameter / FILEPWD = <passw> it still asks for my password, I don't know why?

This is an upgrade of data files (modification of the structure)

I did as stated in the example:
[help.windev.com]

Does anyone know the solution?

I use the wdmodfic method to update links

[infosonline.net]



Edited 1 time(s). Last edit at 07/17/2021 01:42PM by infos.
Attachments:
open | download - kod.png (50.8 KB)
open | download - pass.png (78.5 KB)
Argus
Re: WD - WDModFic file password?
July 17, 2021 04:19PM
are you sure about that?

I'm asking because:
1. that's a pretty BIG limitation
2. There is NO MENTION of it in the help anywhere
3. I have been using exclusively hmodifystructure since it came out and I NEVER had any link problem
Re: WD - WDModFic file password?
July 17, 2021 05:29PM
Hi Argus

Hmodifystructure is simple and changes the structure of the data file but does not create a LINK which is a significant problem, isn't it.

Maybe you have a different code that creates links along the way

[infosonline.net]
Re: WD - WDModFic file password?
July 17, 2021 05:36PM
Hi Argus, I'm definitely NOT sure about that because, much like yourself, I did a lot of tests with HModifyStructure(..) and found that adding, deleting and changing of a link has been no problem to HModifyStructure(..) at all. I'm using and trusting this function for all of the time. But, each time before deploying a new version of a project, I'm doing a test in regards to the links.

The real problem is that the help for HModifyStructure(..) contains this warning.

Maybe, they are right in some respect? One has to ask Tech Support. However, I fear, the answer will be: read the Help!

Kind regards,
Guenter Predl
office@windev.at
Re: WD - WDModFic file password?
July 17, 2021 05:47PM
Hi infos,

up to now, HModifyStructure(..) indeed added, deleted and changed links perfectly all of the time. I really do not know why this sentence is in the Help, but maybe, in some / few / no? cases it doesn't do what it is supposed to do. We simply don't know.

There is HAddLink [help.windev.com]
There is HDescribeLink [help.windev.com]
There is HDeleteLink [help.windev.com]

If in doubt whether a Link has been added or not, you can use HListLink() in order to get a list of the links in your application.

Kind regards,
Guenter Predl
office@windev.at
Re: WD - WDModFic file password?
July 17, 2021 06:19PM
Hi

Here I am testing this Hmodifystructure method and it does NOT add a link and does NOT delete the link?
I use HF Server C / S

I use this source code:

sListOfErrors is string
// Strict check of the structure of files
HCheckStructure("*", hIdentical)
// For all the files
FOR EACH STRING sAFileName OF HListFile() SEPARATED BY CR
WHEN EXCEPTION IN
// Open or create the data file
HCreationIfNotFound(sAFileName)
DO
// Problem
// Is there a difference of structure?
IF HError(hErrCurrent) = 70016 THEN
// Error 70016: THE FILE DOES NOT CORRESPOND TO ITS DESCRIPTION
ToastDisplay("Updating the structure of the file <" + ...
sAFileName + "> in progress...", toastShort, vaMiddle, haCenter)
// Update the structure of the file
IF NOT HModifyStructure(sAFileName) THEN
// Failure updating the structure of the file
sListOfErrors += [CR] + ...
"- Error while modifying the structure for the file <" + ...
sAFileName + ">: " + HErrorInfo()
END
ELSE
// Errors other than a difference of structure
sListOfErrors += [CR] + "- Error while accessing the file <" + ...
sAFileName + ">: " + HErrorInfo()
END
END
END
 
// Compatible check of the file structure
// Therefore, the "most common" modifications allow
// to use the application (see HCheckStructure)
HCheckStructure("*", hCompatible)
 
// Errors occurred?
IF sListOfErrors <> "" THEN
// Message in order to warn
IF NOT YesNo("Errors occurred while opening the files: " + CR + ...
sListOfErrors + CR +...
"Continue the application?") THEN
EndProgram()
END
END

[infosonline.net]



Edited 2 time(s). Last edit at 07/17/2021 06:26PM by infos.
Re: WD - WDModFic file password?
July 18, 2021 10:45AM
Hi,

As far as my testing goes, Hmodifystructure NEVER took care of LINKs in C/S HFSQL.
And in some cases, NOT EVEN wdmodfic did it 100% in C/S HFSQL.

The only solution in HFSQL C/S is to:
1 - Delete all the links with HDeleteLink
2 - Describe and Add your links with HDescribeLink/HAddLink

It works fine in HFSQL Classic - the links here are simple and automatically taken care of ...

It seems, like the reason, that there is NO automatic feature for links in HFSQL C/S, is that links in HFSQL C/S can also be between files in different databases ...

Regard
Steven Sitas
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: