Results 1 to 3 of 3

Thread: How to transform a SQL-Select-Object into a Cursor

  1. #1

    How to transform a SQL-Select-Object into a Cursor

    I did some tests on SQL-Select on my existing VFP-Database. As expected it's high-grade compatible with VFP . I can store the result in a cursor, table and array.

    But there are also some very interesting enhancements on this topic in Lianja. For example it's possible, to create XML and also an object directly from SQL-Select:

    select * from table into object oResult

    I found, that i can iterate over each row of the result-object using "foreach":

    foreach oResult AS row
    ?row.fieldname
    endfor


    But is there also an easy way to transform the object into a cursor? Maybe a special function like "Object2Cursor()", or something like this:

    select * from object oResult into cursor cResult

    Of course, i could write a function to do the transformation, but maybe there is already a possibility to do that?

  2. #2
    Lianja MVP
    Join Date
    Feb 2012
    Location
    Berea, KY, USA
    Posts
    2,186
    I haven't tested it, but from what Barry has written, I think you can do:

    oCursor = oResult.cursoradapter()

    Hank

  3. #3
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,184
    Blog Entries
    22
    No there is no function for that.

Tags for this Thread

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Journey into the Cloud
Join us