PC SOFT

GRUPOS DE DISCUSSÃO PROFISSIONAL
WINDEVWEBDEV e WINDEV Mobile

Inicio → WINDEV 2024 → PasswordProtected
PasswordProtected
Iniciado por Pierce, abr., 07 2024 11:33 AM - 4 respostas
Publicado em abril, 07 2024 - 11:33 AM
I have a problem of how to cast this.
I loop through a directory of data files.
For this example I have a string variable that contains the data file name of "setup.fic"
Now I want to know if the file "setup.fic" is password protected.
I need to turn the string "setup.fic" to reference that data file "setup.fic".
And thus hopefully I can then test if it is password protected.

I am making a little app which when retrieving the list of data files in a directory i can easily
identify which ones are password protected.

PasswordProtected help file: https://doc.windev.com/en-US/…

I need a bit more code help than the snippet they provided.
Thanks for any help that is provided.
Publicado em abril, 08 2024 - 9:51 AM
Dans son message précédent, Pierce a écrit :
I have a problem of how to cast this.
I loop through a directory of data files.
For this example I have a string variable that contains the data file name of
"setup.fic"
Now I want to know if the file "setup.fic" is password protected.
I need to turn the string "setup.fic" to reference that data file
"setup.fic".
And thus hopefully I can then test if it is password protected.

I am making a little app which when retrieving the list of data files in a
directory i can easily
identify which ones are password protected.

PasswordProtected help file:
https://doc.windev.com/en-US/…

I need a bit more code help than the snippet they provided.
Thanks for any help that is provided.


hello

try this :

MyFileHF_WD is Data Source

HDeclareExternal("C:\AnExample\setup.fic", "MyFileHF_WD")

info(MyFileHF_WD.PasswordProtected)

--
Cordialement JeAn-PhI
Membro registado
6 mensagems
Publicado em abril, 08 2024 - 6:36 PM
HDeclareExternal has proved helpful. It wasn't one of the H functions I thought I would have needed.
Using that I was able to see the fields in my data table and the records it contained.

My code below:

dsDataFile is Data Source
HDeclareExternal("D:\PC Soft Projects\Windev\wwnzapp hfsql\Database\setup.fic",dsDataFile)
Info(dsDataFile.PasswordProtected)


At "Info(dsDataFile.PasswordProtected)" an error is returned:

<PasswordProtected> is not an item or a parameter of <_SOURCE_dsDataFile_1>. New parameters should not be declared after a query has been prepared. Make sure there are no syntax errors in the item or parameter name.

PasswordProtected is a property of Data Source. I am close. I must be missing something else.
Membro registado
6 mensagems
Publicado em abril, 09 2024 - 6:35 AM
I have resolved my issue.
See code fix below:

// I had the code below
Info(dsDataFile.PasswordProtected)

// It should be this (Note the "double dots")
Info(dsDataFile..PasswordProtected)


I am able to continue on with my little project.

Thank you JeAn-PhI for steering me in the right direction.
Publicado em abril, 09 2024 - 12:18 PM
Pierce DUBROCK a émis l'idée suivante :
I have resolved my issue.
See code fix below:

// I had the code below
Info(dsDataFile.PasswordProtected)

// It should be this (Note the "double dots")
Info(dsDataFile..PasswordProtected)


I am able to continue on with my little project.

Thank you JeAn-PhI for steering me in the right direction.


the properties used with a single point are for recent versions of
WinDev, those with two points are for older versions, however the
notation with two points can be used in all or in certain specific
cases

--
Cordialement JeAn-PhI