Results 1 to 9 of 9

Thread: SQL statement as grid source

  1. #1

    SQL statement as grid source

    How do I set up an SQL statement as a grid source? I can't find any information on how to get this working.

    Name:  lianja grid with sql.jpg
Views: 961
Size:  31.9 KB

  2. #2
    Lianja MVP
    Join Date
    Feb 2012
    Location
    Berea, KY, USA
    Posts
    2,185
    Hi Pertti,

    The grid does not adjust columns based on the SQL statement: they are set up in development mode only.

    You can make columns non visible at runtime.

    You can requery with an entirely new WHERE clause.

    What's your goal here?

    Hank

    PS: good to see you here.

    PPS: I'm putting the finishing touches on code that takes info from the VPM DD and the Remote Views DBC and allows runtime view creation (using CA's) or, for UI's, generating views with attributes supplied (for keyfieldlist, updatefields, etc.). Technically it could run just off the Remote Views DBC, but of course would miss out on captions and other information. It doesn't have al the triggers filled in, but the structure is there for it.
    Last edited by HankFay; 2017-01-09 at 16:58.

  3. #3
    Hey, Hank --

    Thank you for your message, I actually figured out the column hiding. My goal, although I'm rethinking it, is to use the SQL statement to grab a "cursor" (virtual table it is called here, I guess) and use it to manipulate data from an ODBC connected VFP database for display here.

    I'm trying to build a web version of a Dashboard that I wrote for my accounting app in VFP, but I'm running into all kinds of puzzling problems (like this one as well as a problem with X-axis labels on a line chart - see my previous question.) I'm also getting a "server not found" error when trying to run my still immature app in web view, but that may have to do with the fact that I'm using a VFP ODBC -connection (who knows?)

    Unfortunately the Lianja Wiki help is not as good as I expected when it comes to what you can and cannot do with the property sheets.

    I actually purchased a full-blown copy of Lianja thinking that I will be more likely to give it a serious try when I have some of my own skin in the game. I understand that you've been working on Lianja for a while; Have you made any business apps with it that are currently in use? How is it holding up?

    I'm afraid I'll be posting a whole lot of questions here while I climb the learning curve. I like a lot of things with Lianja, and if only the help was more comprehensive I'd be actually happy with it.

  4. #4
    Referring to my original question, I'm wondering what is the use case for the SQL statement in the property sheet since it doesn't seem to do anything.

  5. #5
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,165
    Blog Entries
    22
    It's more specific to desktop apps.

    It is better to use Virtual Tables if you want to target web and/or mobile.

    I'd really recommend going through the examples opening them up and then run them in web and mobile then you will see what can be accomplished with very little coding.

    It's important to realize that Lianja/VFP does not run in the browser but it can be used to generate dynamic content that is rendered in WebViews and DialogPanels.

    The "client-side" delegates should be written in JavaScript.

    You will find that the majority of VFP functions are available in the Lianja JavaScript framework.

    You can play with these in the Web inspector | Console. Remember JavaScript is a case sensitive language.
    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

  6. #6
    Senior Member
    Join Date
    Feb 2012
    Location
    Rome - Italy
    Posts
    1,893
    Hi Perrty,
    you can use also a Custom VFP Section and use the "Browse" command.
    Name:  2017-01-10 06_10_38-Rina - Dev.jpg
Views: 1045
Size:  70.4 KB

    In this case, bsed on the menu choice, I browse a different table.
    Name:  2017-01-10 06_11_09-Lianja App Builder v3.2.0 [sem_search] - UTF-8 - southwind - Licensed to Sof.jpg
Views: 896
Size:  29.8 KB

    Ciao
    Fabio

  7. #7
    Senior Member
    Join Date
    Feb 2012
    Location
    Rome - Italy
    Posts
    1,893
    You cau use the "setattr" to change the displayed table at runtime.

    loFilter.setAttr("browseCommand", "browse noappend noactionbar noedit nodelete fields " + lsBrowse + lsStyle)

  8. #8
    Hi, Phabio --

    Thank you for the tip, I will certainly take a look at that. I assume it works on mobile and web as well as desktop.

  9. #9
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,165
    Blog Entries
    22
    Hi Perti,

    Desktop client only. It's VFP browse embedded in a page.
    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