[on-rev]Line endings for a db query

Bob Sneidar bobs at twft.com
Mon Apr 2 15:05:00 EDT 2012


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





More information about the use-livecode mailing list