[V4MD] getRecordAsPropList not found??

Irv Kalb Irv at furrypants.com
Sat Sep 20 13:18:37 CDT 2008


I'm sure that I'm missing some basic concept here.  I execute a 
statement like this:

   cursor = poDB.SqlQuery("SELECT * FROM ModuleNames")

If then look at the value of the variable "cursor" that is returned, 
and I get a perfectly formatted Lingo property list.  In this 
particular example, the value of cursor is:

[#rowsChanged: 0, #errNumber: 0, #errNumberHex: "0x0", #errString: 
<Void>, #columns: [#moduleNum, #abbreviation, #shortName, #longName, 
#CDName], #rows: [["01", "HI", "Humanity's Imprint", "Humanity?s 
Imprint", "Arch"], ["02", "LT", "Leaving a Trail", "Leaving a Trail", 
"Arch"], ["03", "TD", "Tracking Down Time", "Tracking Down Time", 
"Arch"], ["04", "CT", "Charting Time", "Charting Time", "Arch"], 
["05", "FT", "Following the Trail", "Following the Trail", "Arch"], 
["06", "DT", "Detecting Technology", "Detecting Technology", "Arch"], 
["07", "PS", "Provisioning Society", "Provisioning Society", "Arch"], 
["08", "PT", "Preserving the Trail", "Preserving the Trail", "Arch"]]]

Using Lingo, I can easily get the value of the #columns property and 
the #rows property from this property list.  And because this is a 
property list, it is not surprising that I cannot call 
"getRecordsAsPropList".  cursor.recordCount fails in a similar way.

I have already written a quick little Lingo routine to reformat the 
data into the way that I want to see it.  However, I am curious to 
find out what I was doing wrong.  I'm guessing that there is a way to 
create a cursor object from the database (as opposed to my creating a 
variable called 'cursor'), then call the getRecordsAsPropList routine 
using that cursor object.  But I couldn't figure out the syntax.

Thanks,

Irv


At 9:36 AM +0300 9/20/08, Ruslan Zasukhin wrote:
>On 9/19/08 7:36 PM, "Irv Kalb" <Irv at furrypants.com> wrote:
>
>Hi Irv,
>
>>  I am trying to access a table in my database and get back the entire
>>  contents as a list of property lists.  The code I am using is:
>>
>>     cursor = poDB.SqlQuery("SELECT * FROM ModuleNames")
>>     pllModuleNames = cursor.getRecordsAsPropList(1, -1)
>>
>>
>>  poDB is a valid reference to an open database, and 'ModuleNames' is
>>  the name of a table.  If I print out value of cursor, it has all the
>>  information I need in the #columns and #rows entries just as I would
>>  expect it - looks perfect.
>
>Hmm, so cursor is valid.
>Usually such error comes if object is invalid.
>
>>    I was just assuming/hoping that getRecordsAsPropList would do a
>>  conversion for me so that it would make a list of property lists.
>>  But instead, I get an error message saying:
>>
>>
>>     Script error:  Handler not found in object
>>
>>     pllModuleNames = crsor.getRecordsAsPropList(1, -1)
>>
>>     #getRecordsAsPropList
>
>Only this method of Vcursor is not found for crsor?
>
>For example, if works
>
>     crsor.RecordCount ?
>
>
>>  (I also tried using no parameters, but got the same result)
>>
>>  Huh?  What am I missing?  Is this not what getRecordsAsPropList does?
>>  Is there a different way to do this?  I can certainly build this
>>  myself from the #columns and #rows information, but I'd rather not if
>>  I don't have to.
>
>--
>Best regards,
>
>Ruslan Zasukhin
>VP Engineering and New Technology
>Paradigma Software, Inc
>
>Valentina - Joining Worlds of Information
>http://www.paradigmasoft.com
>
>[I feel the need: the need for speed]
>
>
>_______________________________________________
>Valentina mailing list
>Valentina at lists.macserve.net
>http://lists.macserve.net/mailman/listinfo/valentina


-- 

Multimedia R Us


More information about the Valentina mailing list