PC SOFT

GRUPOS DE DISCUSSÃO PROFISSIONAL
WINDEVWEBDEV e WINDEV Mobile

Inicio → WINDEV Mobile 2024 → More detail in resetting database
More detail in resetting database
Iniciado por Mike Stewart, fev., 07 2017 6:47 PM - 4 respostas
Publicado em fevereiro, 07 2017 - 6:47 PM
I am trying to delete all of the data from my database as part of a security feature.

I tried looping through an array of filenames and using hdeleteall but not all of the physical files had been created yet because of some of them needing password protection.

However, I was unable to deal with the errors when the files could not be found.

This I solved by creating the file using hcreationifnotfound to create the files.

However......

I am still having problems as they are certain files which hdeleteall is not working. I have tried opening and or closing the file before hand. I have tried hdelete... but the one line of data is still there.

Please help... this is driving me crazy
Publicado em fevereiro, 07 2017 - 9:32 PM
Hi Mike,

as I was saying before, a simple loop on hCreation will do the trick
(it will create/force the file EMPTY)

Best regards

--
Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting

Ready for you: WXShowroom.com, WXReplication (open source) and now WXEDM
(open source)

More information on http://www.fabriceharari.com


Le 2/7/2017 à 12:47 PM, Mike Stewart a écrit :
I am trying to delete all of the data from my database as part of a
security feature.

I tried looping through an array of filenames and using hdeleteall but
not all of the physical files had been created yet because of some of
them needing password protection.

However, I was unable to deal with the errors when the files could not
be found.

This I solved by creating the file using hcreationifnotfound to create
the files.

However......

I am still having problems as they are certain files which hdeleteall is
not working. I have tried opening and or closing the file before hand.
I have tried hdelete... but the one line of data is still there.

Please help... this is driving me crazy
Publicado em fevereiro, 07 2017 - 10:35 PM
OK... so hcreation works where hdeleteall doesn't

No idea why but thanks Fabrice
Membro registado
3.659 mensagems
Popularité : +175 (223 votes)
Publicado em fevereiro, 08 2017 - 3:21 AM
Hello mike

Contact me by skype adrianoboller

I will help you

:thank you:

--
Adriano José Boller
______________________________________________
Consultor e Representante Oficial da
PcSoft no Brasil
+55 (41) 99949 1800
adrianoboller@gmail.com
skype: adrianoboller
http://wxinformatica.com.br/
Publicado em fevereiro, 08 2017 - 1:17 PM
Hi


Le 2/7/2017 à 4:35 PM, Mike Stewart a écrit :
OK... so hcreation works where hdeleteall doesn't

No idea why but thanks Fabrice


It's simple: They are not doing the same thing.

hdeleteall delete ALL RECORDS inside the file. For that, the file NEEDS
TO EXIST, and that was your problem.

hCreation creates the file empty (if it's already there it's overwritten
empty). So this works if your file exist or not (and i('s much faster too).

Best regards

--
Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting

Ready for you: WXShowroom.com, WXReplication (open source) and now WXEDM
(open source)

More information on http://www.fabriceharari.com