Problems saving tables in files

Find quick help here to get you started with Hollywood
Post Reply
User avatar
Juan Carlos
Posts: 662
Joined: Mon Sep 06, 2010 1:02 pm
Contact:

Problems saving tables in files

Post by Juan Carlos »

I have this code to save several dates from one table inside of one file called iConecta.prefs:
saveconfigtable[0]=Lengua$
saveconfigtable[1]=Skin$
saveconfigtable[2]=Sonido$
saveconfigtable[3]=Time$
saveconfigtable[4]=DestinoOWB$
saveconfigtable[5]=AskCookie$
OpenFile(1, "iConecta.prefs", #MODE_WRITE)
WriteTable(1, saveconfigtable)
CloseFile(1)

The problem is when I save several times the file if I make a change the contiguous fields instead of to save the current valour, are save with an empty string or the field not is possible read.
I tryed to again give the field valour before to upload but the problem continue, I see that this problem with two fields don't exist.
Where is the problem?

plouf
Posts: 109
Joined: Sun Feb 04, 2018 11:51 pm
Location: Athens,Greece

Re: Problems saving tables in files

Post by plouf »

but this is only part of your code .
how do we know that is not a problem in your program? like saving a 0 character and reading back strings , creating the problem ?

also hollywood has saveprefs and loadprefs which maybe a more proprietary way to do it

User avatar
Juan Carlos
Posts: 662
Joined: Mon Sep 06, 2010 1:02 pm
Contact:

Re: Problems saving tables in files

Post by Juan Carlos »

The strange is that this routine save the table fine when I call to save function but now the same routine has the problem even with two fields, I reinstalled the Hollywood for Windows and nothing the problem continue, perhaps I have test you suggestion of LoadPrefs, but I want know the problem because this limit very much using sae the table for other things. :?:

User avatar
Juan Carlos
Posts: 662
Joined: Mon Sep 06, 2010 1:02 pm
Contact:

Re: Problems saving tables in files

Post by Juan Carlos »

I found the problem although it is very mysterious the problem was in one of fields from the table, it had different name in save function and in main declaration and initialized, but here is the strange in previous versions of my program it works fine and now not.
Thank you for your help.

Post Reply