Hi all,
It's nice to be back in AMS.
Im a bit shaken by discovering how rusty your skills get when you don't use em for years.
Can some one help me get my head around this problem...
I am creating a small app that my students should make and we are working on tables and nested tables.
So I have created the follow function:
(It's a smaal app they can use to store there homework assignments in, so it it going to get more tables inside the main table)
Eatch table wil have 4 values (lets call them value1, value2, value3 and value4)
so the main table is tblData
and eatch set of data is written into the main table (sort of the same way as the Employee sample in the help files.
And here is the problem. I want to save the tblData Table to file when done working with it and reading it back into the app when it opens.
naive as I am I used the textfile.wrtiefromtable function, but when I look into the textfile after the application exits, the file is empty.
What is my problem?
my first thourght is that is could have something to do with the Textfile.WriteFromTable function, that it cannot see the data in the nested tables and therefore saves the empty file?
Is there another way to do this so I can save and read the file?
I specifically does not want to use a database (we are saving that for when the app is finished to have a session on code optimisation).
- Jonas
It's nice to be back in AMS.
Im a bit shaken by discovering how rusty your skills get when you don't use em for years.
Can some one help me get my head around this problem...
I am creating a small app that my students should make and we are working on tables and nested tables.
So I have created the follow function:
Code:
function createDB() tblData = {}; sPassword = Dialog.PasswordInput("Password", "Dit Password:", MB_ICONQUESTION); md5Password = Crypto.MD5DigestFromString(enCrypt(sPassword)); tblVerify = {Pass=md5Password}; tblData[1] = tblVerify Dialog.Message("md5 Hash", tblData[1].Pass); TextFile.WriteFromTable(pMyDocuments.."\\AMS_Test.txt", tblData, false); end
Eatch table wil have 4 values (lets call them value1, value2, value3 and value4)
so the main table is tblData
and eatch set of data is written into the main table (sort of the same way as the Employee sample in the help files.
And here is the problem. I want to save the tblData Table to file when done working with it and reading it back into the app when it opens.
naive as I am I used the textfile.wrtiefromtable function, but when I look into the textfile after the application exits, the file is empty.
What is my problem?
my first thourght is that is could have something to do with the Textfile.WriteFromTable function, that it cannot see the data in the nested tables and therefore saves the empty file?
Is there another way to do this so I can save and read the file?
I specifically does not want to use a database (we are saving that for when the app is finished to have a session on code optimisation).
- Jonas
Comment