Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: Data source independent connections in coming in RC5.3

  1. #11
    Lianja MVP
    Join Date
    Feb 2012
    Location
    Berea, KY, USA
    Posts
    2,184
    Quote Originally Posted by phabio View Post
    Yes, the problem is exactly that.. :-)
    In my old application I've used the view as a Datasource in some form.. but with more records, the performance in a lan application are not good..
    As David said, you use parameters (which Barry helpfully showed how to change on-the-fly). Under VFP the view would be opened with the NODATA command (use myview nodata), and then requeried. Until Barry adds NODATA to the USE command, it's easy enough to put the code Barry used into a little prg like pspOpenVT(<cview>,<calias>,<lNoData>,...) (our library routines begin with "psp" so they are easy to keep straight). Then you provide a place of the user to query which records they want.

    If you want to show them all 2M records, Herb's idea (below), which VFP uses (except I think the default is 100 records), can work. But you will still need to give the user a way to select from that many records, so what's gained by showing them the first 50 records they probably don't want (of the 2M)?

    Hank

  2. #12
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,161
    Blog Entries
    22
    Herb, the problem with that approach is the full query is still performed on the server. There is a fetchsize in the CA. I need to enable it in the properties of the VT.

    One of the shortcomings of MSSQL is the lack of a limit clause on sql select. Most other databases (e.g MySQL, LIanjaSQL) have this. MSSQL TOP(n) is not a substitute when paging through large amounts of data.

    I will revisit deferred fetches later, only drawback with it (having looked at it) it requires a permanent connection to the server resultset which can be resource intensive on a heavily loaded system.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

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