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

    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
    Berea, KY, USA
    I haven't tested it, but from what Barry has written, I think you can do:

    oCursor = oResult.cursoradapter()


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

Tags for this Thread



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