How safe is the data in the datagrid?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

How safe is the data in the datagrid?

Andrew Kluthe
Hey all,

I am currently working on a database app that needs to work whether it is connected to the db or not.

For this, I just check the connection before each transaction and if it is connected it puts the data into a mySQL.

If it is not connected, I have it storing it in a datagrid queue until the next connection is detected.

Once connected, my program loops through the dataGrid and inserts it into the DB. After a successful insertion that index gets deleted from the dataGrid.

My original idea was to store these locally as a tab delimited text file or as xml.

How safe is the data in the dataGrid from program crashes and in between sessions of use? The local data must be kept intact until it can be successfully loaded into the DB.

Should I dump to an xml or txt file as a backup plan, or is this unnecessary?
Reply | Threaded
Open this post in threaded view
|

Re: How safe is the data in the datagrid?

slylabs13
I think you will have to eventually either dump your data to a text file whenever it's modified, or else if you intend to produce a compiled app, consider having your main app as a stack attached to your startup app, which cannot be modified. That way you can simply store the contents in a custom property in the datagrid, which is what I do.

Bob


On Aug 17, 2010, at 8:57 AM, Andrew Kluthe wrote:

>
> Hey all,
>
> I am currently working on a database app that needs to work whether it is
> connected to the db or not.
>
> For this, I just check the connection before each transaction and if it is
> connected it puts the data into a mySQL.
>
> If it is not connected, I have it storing it in a datagrid queue until the
> next connection is detected.
>
> Once connected, my program loops through the dataGrid and inserts it into
> the DB. After a successful insertion that index gets deleted from the
> dataGrid.
>
> My original idea was to store these locally as a tab delimited text file or
> as xml.
>
> How safe is the data in the dataGrid from program crashes and in between
> sessions of use? The local data must be kept intact until it can be
> successfully loaded into the DB.
>
> Should I dump to an xml or txt file as a backup plan, or is this
> unnecessary?
> --
> View this message in context: http://runtime-revolution.278305.n4.nabble.com/How-safe-is-the-data-in-the-datagrid-tp2328573p2328573.html
> Sent from the Revolution - User mailing list archive at Nabble.com.
> _______________________________________________
> use-revolution mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: How safe is the data in the datagrid?

Andrew Kluthe
I should have explained. The stack it is getting stored in is to be shipped as a stack and run with a launcher.

What are the chances of data that is stored in a stack might be damaged or lost when the app crashes?

Anyone had this happen?

Hmm, and my autoupdate feature just downloads the new version of the stack. If it overwrites their copy, I assume any data stored within is gone too huh?
Reply | Threaded
Open this post in threaded view
|

Re: How safe is the data in the datagrid?

slylabs13
Your assumptions would be accurate. Actually, since a datagrid is simply a bunch of Revolution buttons and fields, your chances are exactly the same that the dat in the datagrid would get corrupted as any other control. But I don't think I have ever seen a revolution lockup corrupt data in a field. If it did, it would probably corrupt the whole stack. I don't think that is something you have to worry about. This isn't Hypercard you know!! ;-)

At any rate, I think you are getting on the right track thinking about data persistence through any state, which is going to involve saving the data to an external source no matter what. I would do it after the user exits the data grid. That is how any disk based database I have ever seen does it. No one expects data to be retained as the user is entering it! If the data is confidential, then you have to start thinking about encoding and decoding and such.

Bob

 
On Aug 17, 2010, at 11:12 AM, Andrew Kluthe wrote:

>
> I should have explained. The stack it is getting stored in is to be shipped
> as a stack and run with a launcher.
>
> What are the chances of data that is stored in a stack might be damaged or
> lost when the app crashes?
>
> Anyone had this happen?
>
> Hmm, and my autoupdate feature just downloads the new version of the stack.
> If it overwrites their copy, I assume any data stored within is gone too
> huh?
> --
> View this message in context: http://runtime-revolution.278305.n4.nabble.com/How-safe-is-the-data-in-the-datagrid-tp2328573p2328793.html
> Sent from the Revolution - User mailing list archive at Nabble.com.
> _______________________________________________
> use-revolution mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution