[on-rev]Line endings for a db query

Bob Sneidar bobs at twft.com
Mon Apr 2 16:42:40 EDT 2012


Whoops! My bad yes it's dec 12 newline. I just assumed in a list of that nature on a web site the first column would be the one the majority of people care about. :-)

Bob


On Apr 2, 2012, at 12:16 PM, Pete wrote:

> Do you mean decimal 10 or octal 10?  Decimal 10 is newline (which is what
> I'd expect), octal 10 is backspace.
> Pete
> 
> On Mon, Apr 2, 2012 at 12:05 PM, Bob Sneidar <bobs at twft.com> wrote:
> 
>> I just checked to see what revDataFromQuery uses for a row delimiter by
>> default, if you do not provide one. It returns ascii 10, the backspace
>> character! Very odd. Must be an HTML thingummy.
>> 
>> I then specified comma and cr as the column and row delimiters like so:
>> 
>>  put revDataFromQuery(comma,cr,theConnID,"select * from events") & cr
>> into theSQLData
>>  put revDataFromQuery(comma,cr,theConnID,"select * from clients") & cr
>> after theSQLData
>> 
>> This produced NO extra line that I could see. If you still get an extra
>> line using this method, I suspect you have a blank record in your table.
>> 
>> Bob
>> 
>> 
>> On Apr 2, 2012, at 10:57 AM, Martin Koob wrote:
>> 
>>> Hi Peter
>>> 
>>> Thanks, I just tried your suggestion.
>>> 
>>> That still inserts blank lines into the variable that I have to filter
>> out
>>> later.
>>> 
>>> It seems the revDataFromQuery does not insert an end of line character
>> after
>>> the last record and
>>> it seems that the end of line character that is used to separate lines in
>>> the variable is not the same as the return or LF constants in LiveCode.
>>> 
>>> Martin
>>> 
>>> --
>>> View this message in context:
>> http://runtime-revolution.278305.n4.nabble.com/on-rev-Line-endings-for-a-db-query-tp4526068p4526757.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
>> 
>> 
>> _______________________________________________
>> 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
>> 
>> 
> 
> 
> -- 
> Pete
> Molly's Revenge <http://www.mollysrevenge.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