Saving a database

Creating desktop or client-server database solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
BKhamissi
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 3
Joined: Sat Mar 16, 2013 10:08 am

Saving a database

Post by BKhamissi » Mon Aug 12, 2013 6:08 pm

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.

BvG
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1239
Joined: Sat Apr 08, 2006 1:10 pm
Contact:

Re: Saving a database

Post by BvG » Wed Aug 21, 2013 2:39 pm

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
Various teststacks and stuff:
http://bjoernke.com

Chat with other RunRev developers:
chat.freenode.net:6666 #livecode

BKhamissi
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 3
Joined: Sat Mar 16, 2013 10:08 am

Re: Saving a database

Post by BKhamissi » Thu Aug 22, 2013 4:39 pm

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.

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: Saving a database

Post by Simon » Thu Aug 22, 2013 10:14 pm

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
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

Post Reply