Confused about storing arrays in a custom property

Pete pete at mollysrevenge.com
Mon Aug 22 13:29:36 EDT 2011


Thanks Andrew and Bob.  Unfortunately, I'm using an sqlite database and as
far as I can tell from the docs, it doesn't have a binary data type.  I
could define a column as BINARY but it would end up as NUMERIC in sqlite's
world.  I'll give it a whirl though.

I've actually now written a function to convert a multidimensional array
into a string with one line for each of the first level keys and each line
containing the keys separated by tabs, ending up with the value in the
lowest level key.  That way I can just store the text string in the db
without a problem, and I also have a simple command to assemble the strings
into an array when I read them back from the db. So if Array["abc"]["def"]
contains "xyz", the resulting line would be "abc<tab>def<tab>xyz".  This was
the cause of my other recent posts about what happens when the last item in
a string is empty.  Provided some interesting recursion opportunities!

Pete
Molly's Revenge <http://www.mollysrevenge.com>




On Mon, Aug 22, 2011 at 9:49 AM, Andrew Kluthe <andrew at rjdfarm.com> wrote:

> It sounds to me like binary is the data type you want here.
>
> --
> View this message in context:
> http://runtime-revolution.278305.n4.nabble.com/Confused-about-storing-arrays-in-a-custom-property-tp3757539p3760664.html
> Sent from the Revolution - User mailing list archive at Nabble.com.
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>



More information about the Use-livecode mailing list