Confused about storing arrays in a custom property

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

Confused about storing arrays in a custom property

Peter Haworth-2
I read in the LC manual that it isn;t possible to store an array in a single
custom property, yet I have done that and it seems to work fine.  The
Inspector doesn't show the value, just a greyed out message about it being
an array.

Before I go any further down that path, is this a safe thing to do?

Pete
Molly's Revenge <http://www.mollysrevenge.com>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Confused about storing arrays in a custom property

xtalkprogrammer
Hi Pete,

This part of the documentation is probably from the time before multidimensional arrays. When multidimensional arrays were introduced, we also got a way to store them as custom properties. Don't worry.

--
Kind regards,

Mark Schonewille
Economy-x-Talk
Http://economy-x-talk.com

Share the clipboard of your computer over a local network with Clipboard Link http://clipboardlink.economy-x-talk.com


Op 20 aug. 2011 om 21:46 heeft Pete <[hidden email]> het volgende geschreven:

> I read in the LC manual that it isn;t possible to store an array in a single
> custom property, yet I have done that and it seems to work fine.  The
> Inspector doesn't show the value, just a greyed out message about it being
> an array.
>
> Before I go any further down that path, is this a safe thing to do?
>
> Pete
> Molly's Revenge <http://www.mollysrevenge.com>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

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

Drs. Mark Schonewille

Economy-x-Talk Consultancy and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
Facebook: http://facebook.com/LiveCode.Beginner
KvK: 50277553
Reply | Threaded
Open this post in threaded view
|

Re: Confused about storing arrays in a custom property

Peter Haworth-2
Great, thanks.

Next issue is using combine and split with multidimensional arrays.  It
seems like they only work for a single dimension array.  I guess to use them
with multidimensional arrays, you have to apply them to each level of array
key?  Maybe a recursive function of some sort?
Pete
Molly's Revenge <http://www.mollysrevenge.com>




On Sat, Aug 20, 2011 at 12:57 PM, Mark Schonewille <
[hidden email]> wrote:

> Hi Pete,
>
> This part of the documentation is probably from the time before
> multidimensional arrays. When multidimensional arrays were introduced, we
> also got a way to store them as custom properties. Don't worry.
>
> --
> Kind regards,
>
> Mark Schonewille
> Economy-x-Talk
> Http://economy-x-talk.com
>
> Share the clipboard of your computer over a local network with Clipboard
> Link http://clipboardlink.economy-x-talk.com
>
>
> Op 20 aug. 2011 om 21:46 heeft Pete <[hidden email]> het volgende
> geschreven:
>
> > I read in the LC manual that it isn;t possible to store an array in a
> single
> > custom property, yet I have done that and it seems to work fine.  The
> > Inspector doesn't show the value, just a greyed out message about it
> being
> > an array.
> >
> > Before I go any further down that path, is this a safe thing to do?
> >
> > Pete
> > Molly's Revenge <http://www.mollysrevenge.com>
> > _______________________________________________
> > use-livecode mailing list
> > [hidden email]
> > Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Confused about storing arrays in a custom property

Richard Gaskin
Pete wrote:
> Next issue is using combine and split with multidimensional arrays.  It
> seems like they only work for a single dimension array.  I guess to use them
> with multidimensional arrays, you have to apply them to each level of array
> key?  Maybe a recursive function of some sort?

Split and combine translate data to and from simple delimited lists, and
since lists aren't hierarchical by nature there is no meaningful action
that can be performed with those commands on multi-level data.

If the goal is to store an array on disk for later use, see the
arrayEncode and arrayDecode functions.

--
  Richard Gaskin
  Fourth World
  LiveCode training and consulting: http://www.fourthworld.com
  Webzine for LiveCode developers: http://www.LiveCodeJournal.com
  LiveCode Journal blog: http://LiveCodejournal.com/blog.irv

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

Re: Confused about storing arrays in a custom property

Peter Haworth-2
Thanks Richard, writing to a file (an sqlite database actually) is exactly
what I want to do.

However, I'm running into a problem with this.  I believe I have written the
data correctly to the database as a BLOB column, but when I read it back
from the database and use arraydecode to make it into an array again, I get
a runtime error that just names the line and character with no indication of
what the error is.

Here's what I do to put the data into the db and retrieve it.

Updating the DB:
*
*
*put* "UPDATE qdProperties SET qdPropertyValue=CAST (:1 AS BLOB) WHERE
qdPropertyID=5304" into mySQL
revExecuteSQL 1,mySQL,"*bmyencodedarrayinput"

Getting the data back again:

*put* revQueryDatabase(1,"SELECT qdPropertyValue FROM qdProperties WHERE
qdPropertyID=5304") into myRset
*put* revDatabaseColumnNamed(myRset,"qdPropertyValue") intomyencodedarrayoutput
*put* arraydecode(myencodedarrayoutput) into myNewArray

It's that last line of code that throws the run time error.

I'm pretty sure the runtime error is because the binary data that comes back
from the db is not a valid encoded array but I have not used BLOB data in
dbs before so not sure if what I am doing is the correct way to
store/retrieve it.  If anyone has experience with this, would be grateful
for some input.


Thanks,

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




On Sat, Aug 20, 2011 at 2:28 PM, Richard Gaskin
<[hidden email]>wrote:

> Pete wrote:
>
>> Next issue is using combine and split with multidimensional arrays.  It
>> seems like they only work for a single dimension array.  I guess to use
>> them
>> with multidimensional arrays, you have to apply them to each level of
>> array
>> key?  Maybe a recursive function of some sort?
>>
>
> Split and combine translate data to and from simple delimited lists, and
> since lists aren't hierarchical by nature there is no meaningful action that
> can be performed with those commands on multi-level data.
>
> If the goal is to store an array on disk for later use, see the arrayEncode
> and arrayDecode functions.
>
> --
>  Richard Gaskin
>  Fourth World
>  LiveCode training and consulting: http://www.fourthworld.com
>  Webzine for LiveCode developers: http://www.LiveCodeJournal.com
>  LiveCode Journal blog: http://LiveCodejournal.com/**blog.irv<http://LiveCodejournal.com/blog.irv>
>
>
> ______________________________**_________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/**mailman/listinfo/use-livecode<http://lists.runrev.com/mailman/listinfo/use-livecode>
>
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

RE: Confused about storing arrays in a custom property

John Tregea
In reply to this post by Peter Haworth-2
Hi Pete,

I have made extensive use of arrays as custom properties of all sorts of
objects and never ever had a problem. Unless someone else has found a way to
blow things up I think you are perfectly safe.

Regards

John

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Pete
Sent: Sunday, 21 August 2011 5:46 AM
To: How to use LiveCode
Subject: Confused about storing arrays in a custom property

I read in the LC manual that it isn;t possible to store an array in a single
custom property, yet I have done that and it seems to work fine.  The
Inspector doesn't show the value, just a greyed out message about it being
an array.

Before I go any further down that path, is this a safe thing to do?

Pete
Molly's Revenge <http://www.mollysrevenge.com>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1392 / Virus Database: 1520/3845 - Release Date: 08/19/11


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

Re: Confused about storing arrays in a custom property

slylabs13
In reply to this post by Peter Haworth-2
I wonder if you shouldn't be using binary?

Bob


On Aug 21, 2011, at 11:35 AM, Pete wrote:

> Thanks Richard, writing to a file (an sqlite database actually) is exactly
> what I want to do.
>
> However, I'm running into a problem with this.  I believe I have written the
> data correctly to the database as a BLOB column, but when I read it back
> from the database and use arraydecode to make it into an array again, I get
> a runtime error that just names the line and character with no indication of
> what the error is.
>
> Here's what I do to put the data into the db and retrieve it.
>
> Updating the DB:
> *
> *
> *put* "UPDATE qdProperties SET qdPropertyValue=CAST (:1 AS BLOB) WHERE
> qdPropertyID=5304" into mySQL
> revExecuteSQL 1,mySQL,"*bmyencodedarrayinput"
>
> Getting the data back again:
>
> *put* revQueryDatabase(1,"SELECT qdPropertyValue FROM qdProperties WHERE
> qdPropertyID=5304") into myRset
> *put* revDatabaseColumnNamed(myRset,"qdPropertyValue") intomyencodedarrayoutput
> *put* arraydecode(myencodedarrayoutput) into myNewArray
>
> It's that last line of code that throws the run time error.
>
> I'm pretty sure the runtime error is because the binary data that comes back
> from the db is not a valid encoded array but I have not used BLOB data in
> dbs before so not sure if what I am doing is the correct way to
> store/retrieve it.  If anyone has experience with this, would be grateful
> for some input.
>
>
> Thanks,
>
> Molly's Revenge <http://www.mollysrevenge.com>
>
>
>
>
> On Sat, Aug 20, 2011 at 2:28 PM, Richard Gaskin
> <[hidden email]>wrote:
>
>> Pete wrote:
>>
>>> Next issue is using combine and split with multidimensional arrays.  It
>>> seems like they only work for a single dimension array.  I guess to use
>>> them
>>> with multidimensional arrays, you have to apply them to each level of
>>> array
>>> key?  Maybe a recursive function of some sort?
>>>
>>
>> Split and combine translate data to and from simple delimited lists, and
>> since lists aren't hierarchical by nature there is no meaningful action that
>> can be performed with those commands on multi-level data.
>>
>> If the goal is to store an array on disk for later use, see the arrayEncode
>> and arrayDecode functions.
>>
>> --
>> Richard Gaskin
>> Fourth World
>> LiveCode training and consulting: http://www.fourthworld.com
>> Webzine for LiveCode developers: http://www.LiveCodeJournal.com
>> LiveCode Journal blog: http://LiveCodejournal.com/**blog.irv<http://LiveCodejournal.com/blog.irv>
>>
>>
>> ______________________________**_________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/**mailman/listinfo/use-livecode<http://lists.runrev.com/mailman/listinfo/use-livecode>
>>
>>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


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

Re: Confused about storing arrays in a custom property

Andrew Kluthe
It sounds to me like binary is the data type you want here.
Reply | Threaded
Open this post in threaded view
|

Re: Confused about storing arrays in a custom property

Peter Haworth-2
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 <[hidden email]> 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
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Confused about storing arrays in a custom property

slylabs13
interesting. Trevor shared some time ago his printKeys() function so that given:
    put "xyz" into aData["abc"]["def"]
    put "qrs" into adata["abc"]["ghi"]
    put printkeys(aData)

you would get:
abc
     ghi: qrs
     def: xyz

A similar method could probably be devised to put the data back into an array.

All this seems like a lot of trouble though. Why not just store the array in a custom property?
set the aArray of this card to aData -- or this stack if it is a single array

Bob


On Aug 22, 2011, at 10:29 AM, Pete wrote:

> 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 <[hidden email]> 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
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


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

Re: Confused about storing arrays in a custom property

Peter Haworth-2
I do store it in a cprop for use during a single run but I have to preserve
the value between runs so want to store it in an external file. I know there
are ways to do that using separate stacks within standalones - I just prefer
to use an external file rather than that method, especially if I already
have one open for other purposes.

Trevors' printKeys doesn't quite do the job unfortunately.  It doesn't print
all the keys on each line, just indents depending on the key level.  In my
case, I need the output for your example to be:

abc<tab>def<tab>xyz
abc<tab>ghi<tab>qrs

I could probably have used PrintKeys and dealt with the indented format when
recreating the array but it was fun coming up with the algorithm to produce
the above output, plus it made the reassembly of the array very easy.

Haven't had a chance to experiment with simulating a BINARY column in sqlite
yet but if I find a way to do it, I'll probably go with that method.


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




On Mon, Aug 22, 2011 at 10:51 AM, Bob Sneidar <[hidden email]> wrote:

> interesting. Trevor shared some time ago his printKeys() function so that
> given:
>    put "xyz" into aData["abc"]["def"]
>    put "qrs" into adata["abc"]["ghi"]
>    put printkeys(aData)
>
> you would get:
> abc
>     ghi: qrs
>     def: xyz
>
> A similar method could probably be devised to put the data back into an
> array.
>
> All this seems like a lot of trouble though. Why not just store the array
> in a custom property?
> set the aArray of this card to aData -- or this stack if it is a single
> array
>
> Bob
>
>
> On Aug 22, 2011, at 10:29 AM, Pete wrote:
>
> > 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 <[hidden email]>
> 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
> >> [hidden email]
> >> Please visit this url to subscribe, unsubscribe and manage your
> >> subscription preferences:
> >> http://lists.runrev.com/mailman/listinfo/use-livecode
> >>
> >>
> > _______________________________________________
> > use-livecode mailing list
> > [hidden email]
> > Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Confused about storing arrays in a custom property

Jan Schenkel
You could 'base64Encode' the binary data before storing it, and base64decode it after retrieval from the database.
That way you don't have to worry about BINARY, and can store it in a CLOB.
 
HTH,

Jan Schenkel.
=====
Quartam Reports & PDF Library for LiveCode
www.quartam.com


=====
"As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)


----- Original Message -----
From: Pete <[hidden email]>
To: How to use LiveCode <[hidden email]>
Cc:
Sent: Monday, August 22, 2011 8:28 PM
Subject: Re: Confused about storing arrays in a custom property

I do store it in a cprop for use during a single run but I have to preserve
the value between runs so want to store it in an external file. I know there
are ways to do that using separate stacks within standalones - I just prefer
to use an external file rather than that method, especially if I already
have one open for other purposes.

Trevors' printKeys doesn't quite do the job unfortunately.  It doesn't print
all the keys on each line, just indents depending on the key level.  In my
case, I need the output for your example to be:

abc<tab>def<tab>xyz
abc<tab>ghi<tab>qrs

I could probably have used PrintKeys and dealt with the indented format when
recreating the array but it was fun coming up with the algorithm to produce
the above output, plus it made the reassembly of the array very easy.

Haven't had a chance to experiment with simulating a BINARY column in sqlite
yet but if I find a way to do it, I'll probably go with that method.


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




On Mon, Aug 22, 2011 at 10:51 AM, Bob Sneidar <[hidden email]> wrote:

> interesting. Trevor shared some time ago his printKeys() function so that
> given:
>    put "xyz" into aData["abc"]["def"]
>    put "qrs" into adata["abc"]["ghi"]
>    put printkeys(aData)
>
> you would get:
> abc
>     ghi: qrs
>     def: xyz
>
> A similar method could probably be devised to put the data back into an
> array.
>
> All this seems like a lot of trouble though. Why not just store the array
> in a custom property?
> set the aArray of this card to aData -- or this stack if it is a single
> array
>
> Bob
>
>
> On Aug 22, 2011, at 10:29 AM, Pete wrote:
>
> > 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 <[hidden email]>
> 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
> >> [hidden email]
> >> Please visit this url to subscribe, unsubscribe and manage your
> >> subscription preferences:
> >> http://lists.runrev.com/mailman/listinfo/use-livecode
> >>
> >>
> > _______________________________________________
> > use-livecode mailing list
> > [hidden email]
> > Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


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

Re: Confused about storing arrays in a custom property

Peter Haworth-2
Thanks Jan.  I'll try that this afternoon and report back.
Pete
Molly's Revenge <http://www.mollysrevenge.com>




On Mon, Aug 22, 2011 at 12:38 PM, Jan Schenkel <[hidden email]>wrote:

> You could 'base64Encode' the binary data before storing it, and
> base64decode it after retrieval from the database.
> That way you don't have to worry about BINARY, and can store it in a CLOB.
>
> HTH,
>
> Jan Schenkel.
> =====
> Quartam Reports & PDF Library for LiveCode
> www.quartam.com
>
>
> =====
> "As we grow older, we grow both wiser and more foolish at the same time."
>  (La Rochefoucauld)
>
>
> ----- Original Message -----
> From: Pete <[hidden email]>
> To: How to use LiveCode <[hidden email]>
> Cc:
> Sent: Monday, August 22, 2011 8:28 PM
> Subject: Re: Confused about storing arrays in a custom property
>
> I do store it in a cprop for use during a single run but I have to preserve
> the value between runs so want to store it in an external file. I know
> there
> are ways to do that using separate stacks within standalones - I just
> prefer
> to use an external file rather than that method, especially if I already
> have one open for other purposes.
>
> Trevors' printKeys doesn't quite do the job unfortunately.  It doesn't
> print
> all the keys on each line, just indents depending on the key level.  In my
> case, I need the output for your example to be:
>
> abc<tab>def<tab>xyz
> abc<tab>ghi<tab>qrs
>
> I could probably have used PrintKeys and dealt with the indented format
> when
> recreating the array but it was fun coming up with the algorithm to produce
> the above output, plus it made the reassembly of the array very easy.
>
> Haven't had a chance to experiment with simulating a BINARY column in
> sqlite
> yet but if I find a way to do it, I'll probably go with that method.
>
>
> Pete
> Molly's Revenge <http://www.mollysrevenge.com>
>
>
>
>
> On Mon, Aug 22, 2011 at 10:51 AM, Bob Sneidar <[hidden email]> wrote:
>
> > interesting. Trevor shared some time ago his printKeys() function so that
> > given:
> >    put "xyz" into aData["abc"]["def"]
> >    put "qrs" into adata["abc"]["ghi"]
> >    put printkeys(aData)
> >
> > you would get:
> > abc
> >     ghi: qrs
> >     def: xyz
> >
> > A similar method could probably be devised to put the data back into an
> > array.
> >
> > All this seems like a lot of trouble though. Why not just store the array
> > in a custom property?
> > set the aArray of this card to aData -- or this stack if it is a single
> > array
> >
> > Bob
> >
> >
> > On Aug 22, 2011, at 10:29 AM, Pete wrote:
> >
> > > 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 <[hidden email]>
> > 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
> > >> [hidden email]
> > >> Please visit this url to subscribe, unsubscribe and manage your
> > >> subscription preferences:
> > >> http://lists.runrev.com/mailman/listinfo/use-livecode
> > >>
> > >>
> > > _______________________________________________
> > > use-livecode mailing list
> > > [hidden email]
> > > Please visit this url to subscribe, unsubscribe and manage your
> > subscription preferences:
> > > http://lists.runrev.com/mailman/listinfo/use-livecode
> >
> >
> > _______________________________________________
> > use-livecode mailing list
> > [hidden email]
> > Please visit this url to subscribe, unsubscribe and manage your
> > subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
> >
> >
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Confused about storing arrays in a custom property

Peter Haworth-2
In reply to this post by Jan Schenkel
Hi Jan,
The base64Encode worked great, thanks for the tip!  I didn't need to store
it as a CLOB type actually, just as regular text.
Pete
Molly's Revenge <http://www.mollysrevenge.com>




On Mon, Aug 22, 2011 at 12:38 PM, Jan Schenkel <[hidden email]>wrote:

> You could 'base64Encode' the binary data before storing it, and
> base64decode it after retrieval from the database.
> That way you don't have to worry about BINARY, and can store it in a CLOB.
>
> HTH,
>
> Jan Schenkel.
> =====
> Quartam Reports & PDF Library for LiveCode
> www.quartam.com
>
>
> =====
> "As we grow older, we grow both wiser and more foolish at the same time."
>  (La Rochefoucauld)
>
>
> ----- Original Message -----
> From: Pete <[hidden email]>
> To: How to use LiveCode <[hidden email]>
> Cc:
> Sent: Monday, August 22, 2011 8:28 PM
> Subject: Re: Confused about storing arrays in a custom property
>
> I do store it in a cprop for use during a single run but I have to preserve
> the value between runs so want to store it in an external file. I know
> there
> are ways to do that using separate stacks within standalones - I just
> prefer
> to use an external file rather than that method, especially if I already
> have one open for other purposes.
>
> Trevors' printKeys doesn't quite do the job unfortunately.  It doesn't
> print
> all the keys on each line, just indents depending on the key level.  In my
> case, I need the output for your example to be:
>
> abc<tab>def<tab>xyz
> abc<tab>ghi<tab>qrs
>
> I could probably have used PrintKeys and dealt with the indented format
> when
> recreating the array but it was fun coming up with the algorithm to produce
> the above output, plus it made the reassembly of the array very easy.
>
> Haven't had a chance to experiment with simulating a BINARY column in
> sqlite
> yet but if I find a way to do it, I'll probably go with that method.
>
>
> Pete
> Molly's Revenge <http://www.mollysrevenge.com>
>
>
>
>
> On Mon, Aug 22, 2011 at 10:51 AM, Bob Sneidar <[hidden email]> wrote:
>
> > interesting. Trevor shared some time ago his printKeys() function so that
> > given:
> >    put "xyz" into aData["abc"]["def"]
> >    put "qrs" into adata["abc"]["ghi"]
> >    put printkeys(aData)
> >
> > you would get:
> > abc
> >     ghi: qrs
> >     def: xyz
> >
> > A similar method could probably be devised to put the data back into an
> > array.
> >
> > All this seems like a lot of trouble though. Why not just store the array
> > in a custom property?
> > set the aArray of this card to aData -- or this stack if it is a single
> > array
> >
> > Bob
> >
> >
> > On Aug 22, 2011, at 10:29 AM, Pete wrote:
> >
> > > 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 <[hidden email]>
> > 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
> > >> [hidden email]
> > >> Please visit this url to subscribe, unsubscribe and manage your
> > >> subscription preferences:
> > >> http://lists.runrev.com/mailman/listinfo/use-livecode
> > >>
> > >>
> > > _______________________________________________
> > > use-livecode mailing list
> > > [hidden email]
> > > Please visit this url to subscribe, unsubscribe and manage your
> > subscription preferences:
> > > http://lists.runrev.com/mailman/listinfo/use-livecode
> >
> >
> > _______________________________________________
> > use-livecode mailing list
> > [hidden email]
> > Please visit this url to subscribe, unsubscribe and manage your
> > subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
> >
> >
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Confused about storing arrays in a custom property

Jan Schenkel
Glad it helped - as for storing in a CLOB, that's just the database I use at the day-job, which makes a distinction between CLOB and BLOB for schema definition :-)
It always depends on the size of the data, and some RDBMS's can be a bit fussy about the data definition and the supported size.

Jan Schenkel.
=====
Quartam Reports & PDF Library for LiveCode
www.quartam.com


=====
"As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)


----- Original Message -----
From: Pete <[hidden email]>
To: How to use LiveCode <[hidden email]>
Cc:
Sent: Monday, August 22, 2011 11:30 PM
Subject: Re: Confused about storing arrays in a custom property

Hi Jan,
The base64Encode worked great, thanks for the tip!  I didn't need to store
it as a CLOB type actually, just as regular text.
Pete
Molly's Revenge <http://www.mollysrevenge.com>


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

Re: Confused about storing arrays in a custom property

Peter Haworth-2
Good point Jan, I will check on the max size of a TEXT column in sqlite
Pete
Molly's Revenge <http://www.mollysrevenge.com>




On Tue, Aug 23, 2011 at 12:22 PM, Jan Schenkel <[hidden email]>wrote:

> Glad it helped - as for storing in a CLOB, that's just the database I use
> at the day-job, which makes a distinction between CLOB and BLOB for schema
> definition :-)
> It always depends on the size of the data, and some RDBMS's can be a bit
> fussy about the data definition and the supported size.
>
> Jan Schenkel.
> =====
> Quartam Reports & PDF Library for LiveCode
> www.quartam.com
>
>
> =====
> "As we grow older, we grow both wiser and more foolish at the same time."
>  (La Rochefoucauld)
>
>
> ----- Original Message -----
> From: Pete <[hidden email]>
> To: How to use LiveCode <[hidden email]>
> Cc:
> Sent: Monday, August 22, 2011 11:30 PM
> Subject: Re: Confused about storing arrays in a custom property
>
> Hi Jan,
> The base64Encode worked great, thanks for the tip!  I didn't need to store
> it as a CLOB type actually, just as regular text.
> Pete
> Molly's Revenge <http://www.mollysrevenge.com>
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Confused about storing arrays in a custom property

slylabs13
255 if i am not mistaken. Larger and you need to use blobs

bob

On Aug 23, 2011, at 12:46 PM, Pete wrote:

> Good point Jan, I will check on the max size of a TEXT column in sqlite
> Pete
> Molly's Revenge <http://www.mollysrevenge.com>
>
>
>
>
> On Tue, Aug 23, 2011 at 12:22 PM, Jan Schenkel <[hidden email]>wrote:
>
>> Glad it helped - as for storing in a CLOB, that's just the database I use
>> at the day-job, which makes a distinction between CLOB and BLOB for schema
>> definition :-)
>> It always depends on the size of the data, and some RDBMS's can be a bit
>> fussy about the data definition and the supported size.
>>
>> Jan Schenkel.
>> =====
>> Quartam Reports & PDF Library for LiveCode
>> www.quartam.com
>>
>>
>> =====
>> "As we grow older, we grow both wiser and more foolish at the same time."
>> (La Rochefoucauld)
>>
>>
>> ----- Original Message -----
>> From: Pete <[hidden email]>
>> To: How to use LiveCode <[hidden email]>
>> Cc:
>> Sent: Monday, August 22, 2011 11:30 PM
>> Subject: Re: Confused about storing arrays in a custom property
>>
>> Hi Jan,
>> The base64Encode worked great, thanks for the tip!  I didn't need to store
>> it as a CLOB type actually, just as regular text.
>> Pete
>> Molly's Revenge <http://www.mollysrevenge.com>
>>
>>
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


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

Re: Confused about storing arrays in a custom property

Peter Haworth-2
Turns out there's an sqlite parameter that controls the max length
(SQLITE_MAX_LENGTH) - its default is 1 billion so I think I'm safe storing
encoded array information!

You might be thinking of the mySQL CHAR data type size limit which is 255.

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




On Tue, Aug 23, 2011 at 1:54 PM, Bob Sneidar <[hidden email]> wrote:

> 255 if i am not mistaken. Larger and you need to use blobs
>
> bob
>
> On Aug 23, 2011, at 12:46 PM, Pete wrote:
>
> > Good point Jan, I will check on the max size of a TEXT column in sqlite
> > Pete
> > Molly's Revenge <http://www.mollysrevenge.com>
> >
> >
> >
> >
> > On Tue, Aug 23, 2011 at 12:22 PM, Jan Schenkel <[hidden email]
> >wrote:
> >
> >> Glad it helped - as for storing in a CLOB, that's just the database I
> use
> >> at the day-job, which makes a distinction between CLOB and BLOB for
> schema
> >> definition :-)
> >> It always depends on the size of the data, and some RDBMS's can be a bit
> >> fussy about the data definition and the supported size.
> >>
> >> Jan Schenkel.
> >> =====
> >> Quartam Reports & PDF Library for LiveCode
> >> www.quartam.com
> >>
> >>
> >> =====
> >> "As we grow older, we grow both wiser and more foolish at the same
> time."
> >> (La Rochefoucauld)
> >>
> >>
> >> ----- Original Message -----
> >> From: Pete <[hidden email]>
> >> To: How to use LiveCode <[hidden email]>
> >> Cc:
> >> Sent: Monday, August 22, 2011 11:30 PM
> >> Subject: Re: Confused about storing arrays in a custom property
> >>
> >> Hi Jan,
> >> The base64Encode worked great, thanks for the tip!  I didn't need to
> store
> >> it as a CLOB type actually, just as regular text.
> >> Pete
> >> Molly's Revenge <http://www.mollysrevenge.com>
> >>
> >>
> >> _______________________________________________
> >> use-livecode mailing list
> >> [hidden email]
> >> Please visit this url to subscribe, unsubscribe and manage your
> >> subscription preferences:
> >> http://lists.runrev.com/mailman/listinfo/use-livecode
> >>
> >>
> > _______________________________________________
> > use-livecode mailing list
> > [hidden email]
> > Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Confused about storing arrays in a custom property

slylabs13
Oh right. I should read up before one hand typing something. :-)

Bob


On Aug 23, 2011, at 2:20 PM, Pete wrote:

> Turns out there's an sqlite parameter that controls the max length
> (SQLITE_MAX_LENGTH) - its default is 1 billion so I think I'm safe storing
> encoded array information!
>
> You might be thinking of the mySQL CHAR data type size limit which is 255.
>
> Pete
> Molly's Revenge <http://www.mollysrevenge.com>
>
>
>
>
> On Tue, Aug 23, 2011 at 1:54 PM, Bob Sneidar <[hidden email]> wrote:
>
>> 255 if i am not mistaken. Larger and you need to use blobs
>>
>> bob
>>
>> On Aug 23, 2011, at 12:46 PM, Pete wrote:
>>
>>> Good point Jan, I will check on the max size of a TEXT column in sqlite
>>> Pete
>>> Molly's Revenge <http://www.mollysrevenge.com>
>>>
>>>
>>>
>>>
>>> On Tue, Aug 23, 2011 at 12:22 PM, Jan Schenkel <[hidden email]
>>> wrote:
>>>
>>>> Glad it helped - as for storing in a CLOB, that's just the database I
>> use
>>>> at the day-job, which makes a distinction between CLOB and BLOB for
>> schema
>>>> definition :-)
>>>> It always depends on the size of the data, and some RDBMS's can be a bit
>>>> fussy about the data definition and the supported size.
>>>>
>>>> Jan Schenkel.
>>>> =====
>>>> Quartam Reports & PDF Library for LiveCode
>>>> www.quartam.com
>>>>
>>>>
>>>> =====
>>>> "As we grow older, we grow both wiser and more foolish at the same
>> time."
>>>> (La Rochefoucauld)
>>>>
>>>>
>>>> ----- Original Message -----
>>>> From: Pete <[hidden email]>
>>>> To: How to use LiveCode <[hidden email]>
>>>> Cc:
>>>> Sent: Monday, August 22, 2011 11:30 PM
>>>> Subject: Re: Confused about storing arrays in a custom property
>>>>
>>>> Hi Jan,
>>>> The base64Encode worked great, thanks for the tip!  I didn't need to
>> store
>>>> it as a CLOB type actually, just as regular text.
>>>> Pete
>>>> Molly's Revenge <http://www.mollysrevenge.com>
>>>>
>>>>
>>>> _______________________________________________
>>>> use-livecode mailing list
>>>> [hidden email]
>>>> Please visit this url to subscribe, unsubscribe and manage your
>>>> subscription preferences:
>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>>
>>>>
>>> _______________________________________________
>>> use-livecode mailing list
>>> [hidden email]
>>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>>
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


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

Re: Confused about storing arrays in a custom property

Peter Haworth-2
No problem Bob, I'm learning fast that there are a LOT of variations between
SQL DB types!
Pete
Molly's Revenge <http://www.mollysrevenge.com>




On Tue, Aug 23, 2011 at 2:28 PM, Bob Sneidar <[hidden email]> wrote:

> Oh right. I should read up before one hand typing something. :-)
>
> Bob
>
>
> On Aug 23, 2011, at 2:20 PM, Pete wrote:
>
> > Turns out there's an sqlite parameter that controls the max length
> > (SQLITE_MAX_LENGTH) - its default is 1 billion so I think I'm safe
> storing
> > encoded array information!
> >
> > You might be thinking of the mySQL CHAR data type size limit which is
> 255.
> >
> > Pete
> > Molly's Revenge <http://www.mollysrevenge.com>
> >
> >
> >
> >
> > On Tue, Aug 23, 2011 at 1:54 PM, Bob Sneidar <[hidden email]> wrote:
> >
> >> 255 if i am not mistaken. Larger and you need to use blobs
> >>
> >> bob
> >>
> >> On Aug 23, 2011, at 12:46 PM, Pete wrote:
> >>
> >>> Good point Jan, I will check on the max size of a TEXT column in sqlite
> >>> Pete
> >>> Molly's Revenge <http://www.mollysrevenge.com>
> >>>
> >>>
> >>>
> >>>
> >>> On Tue, Aug 23, 2011 at 12:22 PM, Jan Schenkel <[hidden email]
> >>> wrote:
> >>>
> >>>> Glad it helped - as for storing in a CLOB, that's just the database I
> >> use
> >>>> at the day-job, which makes a distinction between CLOB and BLOB for
> >> schema
> >>>> definition :-)
> >>>> It always depends on the size of the data, and some RDBMS's can be a
> bit
> >>>> fussy about the data definition and the supported size.
> >>>>
> >>>> Jan Schenkel.
> >>>> =====
> >>>> Quartam Reports & PDF Library for LiveCode
> >>>> www.quartam.com
> >>>>
> >>>>
> >>>> =====
> >>>> "As we grow older, we grow both wiser and more foolish at the same
> >> time."
> >>>> (La Rochefoucauld)
> >>>>
> >>>>
> >>>> ----- Original Message -----
> >>>> From: Pete <[hidden email]>
> >>>> To: How to use LiveCode <[hidden email]>
> >>>> Cc:
> >>>> Sent: Monday, August 22, 2011 11:30 PM
> >>>> Subject: Re: Confused about storing arrays in a custom property
> >>>>
> >>>> Hi Jan,
> >>>> The base64Encode worked great, thanks for the tip!  I didn't need to
> >> store
> >>>> it as a CLOB type actually, just as regular text.
> >>>> Pete
> >>>> Molly's Revenge <http://www.mollysrevenge.com>
> >>>>
> >>>>
> >>>> _______________________________________________
> >>>> use-livecode mailing list
> >>>> [hidden email]
> >>>> Please visit this url to subscribe, unsubscribe and manage your
> >>>> subscription preferences:
> >>>> http://lists.runrev.com/mailman/listinfo/use-livecode
> >>>>
> >>>>
> >>> _______________________________________________
> >>> use-livecode mailing list
> >>> [hidden email]
> >>> Please visit this url to subscribe, unsubscribe and manage your
> >> subscription preferences:
> >>> http://lists.runrev.com/mailman/listinfo/use-livecode
> >>
> >>
> >> _______________________________________________
> >> use-livecode mailing list
> >> [hidden email]
> >> Please visit this url to subscribe, unsubscribe and manage your
> >> subscription preferences:
> >> http://lists.runrev.com/mailman/listinfo/use-livecode
> >>
> >>
> > _______________________________________________
> > use-livecode mailing list
> > [hidden email]
> > Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode