Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 7 Monaten
Letzter Beitrag:
vor 7 Monaten
Beteiligte Autoren:
Sivaprakash, Al, Fabrice Harari, David Egan

Re: HCreationIfNotFound for some common files

Startbeitrag von Sivaprakash am 17.01.2018 14:06


Would like to create only those files required for this project, if those files are not found. Is there any way to achieve this with HCreationIfNotFound command ?

Say I would like to create those files that starts with HO only, from the analysis, can I mention HCreationIfNotFound("HO*") or equivalent to this ?

That way I can have the same analysis to be used for different projects and when required all application(s) could interact with the same database.

Any solution ?

Happiness Always
BKR Sivaprakash


Re: HCreationIfNotFound for some common files


you can do a hlistFile, then loop on the result and create or not based on your tests on the name of the file

Best regards

von Fabrice Harari - am 17.01.2018 14:28

Re: HCreationIfNotFound for some common files

From within the analysis create a Custom Folder and put those files into it. Then HCreationIfNotFound(FolderName) will do the trick.



von David Egan - am 17.01.2018 19:23

Re: HCreationIfNotFound for some common files


From the Help Note: The automatic creation of non-existing data files can be enabled during the project description ("Files" tab of project description, "Automatically create the data files if not found at opening" option). HCreationIfNotFound is automatically used if the data file does not exist when it is handled for the first time.

If you enable the creation at the project level they will only be created if the code uses them so if your code doesn't use a file, it will not be created.


von Al - am 17.01.2018 21:11

Re: HCreationIfNotFound for some common files

Thanks Fabrice, David Egan, AI.

Fabrice idea worked out. Looks like David Egan's solution looks better for my needs. I'll try out.

AI. Special thanks to you. I was wondering how few files are created automatically when run. By disabling the feature you mentioned, I could figure out a unnecessary code in my code, which solved my other issue. [ for which I was about to seek your help ].

I wish Windev need not create files automatically unless otherwise I code. That feature is already there.

Happiness Always
BKR Sivaprakash

von Sivaprakash - am 18.01.2018 03:52
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.