Page 1 of 1

Saving a database

Posted: Mon Aug 12, 2013 6:08 pm
by BKhamissi
HELP! I had spent a lot of time trying to figure it out but I can't, I am still a beginner and I really need some help.

I created an application that allows users to enter data from fields into a data grid, to create a database. There are more than one data grid in different sub stacks to categorise the data base. I have done all of this, the problem is, I checked the "Move substacks into individual stack files" from the standalone application settings, so the users can save what they entered in the data grid(s) after closing the application. Now when I've done this I found out that the user is not able to enter data in the data grid, while I was able to enter data before, or I can't see what I entered!. So is this is the only way to save the data in the data grid(s)? and how can the users save the data and also see what they entered in the data grid?

PLEASE HELP

I hope I explained the problem well.

Re: Saving a database

Posted: Wed Aug 21, 2013 2:39 pm
by BvG
So you're not really storing data in a Database (like MySQL or Oracle)?

I guess, what you want is that data entered by users is retained within a stack in a standalone. You noticed correctly that a stack needs to be saved separately from a standalone, because standalones can't save themselves. This is called the "splash screen" approach. You'd need to use the "save" command to make sure stuff is saved in a stack.

See also this information:
http://stackoverflow.com/questions/1621 ... base-stack
and the linked lesson:
http://lessons.runrev.com/s/lessons/m/4 ... pplication

Re: Saving a database

Posted: Thu Aug 22, 2013 4:39 pm
by BKhamissi
Yes, I am not storing data in a Database.

And yes, what I want is
data entered by users is retained within a stack in a standalone
. So by "Splash Screen" approach you are saying to just use the "save" command, like:

Code: Select all

 
on CloseStack
  save this stack
end CloseStack
is this is a "Splash Screen" approach? If so then it will just save the data while the standalone application is running and when it is closed and re-opened all the data will be lost! If not please tell me how to do so, or suggest another way to keep the data in the data grid up to date.

Re: Saving a database

Posted: Thu Aug 22, 2013 10:14 pm
by Simon
The Splash Screen approach uses 2 stacks only 1 of them gets built into a standalone the other remains a .livecode (or what ever you want the extension to be).
Because the main application is never built into a standalone it can save to it self.

Simon