PC SOFT

GRUPOS DE DISCUSSÃO PROFISSIONAL
WINDEVWEBDEV e WINDEV Mobile

Inicio → WEBDEV 2024 → Creating Data Files
Creating Data Files
Iniciado por Antonio Díaz, fev., 18 2021 8:34 PM - 3 respostas
Membro registado
70 mensagems
Popularité : +2 (2 votes)
Publicado em fevereiro, 18 2021 - 8:34 PM
Hello,

I am a new user to Windev, Webdev.... I created an Analysis with 5 tables and started playing with it. However, if I create the Pages to add new records or to browse the existing ones, I get no errors. But when updating certain tables that are linked to another table I keep getting errors saying that the table does not exist, which is actually true. My question is, shouldn't this tables be created automatically once they are needed? If not, how can I create them myself?

Thank you in advance.

--

Antonio Diaz
Emphasys Software, S.C.
Membro registado
32 mensagems
Popularité : +1 (1 vote)
Publicado em fevereiro, 19 2021 - 11:24 AM
Hi Antonio

One way would be to simply add a new record to the file and then delete it

hReset(MyFileName)
hAdd(MyFileName)
hDeleteAll(MyFileName)

I'm not sure if you need the second two lines as the hReset should create the file on it's own.

Hope this helps

--
Simon Phillips
OtterReg Software
Publicado em fevereiro, 19 2021 - 12:47 PM
there are several ways of managing data file creation...
You can:
- in the project description, check the option to AUTOMATICALLY create the file at the first access (read/write, doesn't matter)
- in your project init code, add a line like hcreationifnotfound("*")
- or specifically create each file when you need it with hcreationifnotfound(MyFileName)

in NO case do you need to create a record to create a file
Membro registado
70 mensagems
Popularité : +2 (2 votes)
Publicado em fevereiro, 22 2021 - 8:57 PM
Thanks Simon, Argus, I've got it!

--

Antonio Diaz
Emphasys Software, S.C.