Page 2 of 5 FirstFirst 1234 ... LastLast
Results 11 to 20 of 41

Thread: sql select

  1. #11
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    5,767
    I am not on my computer at the moment. I will investigate and get back to you when I am.
    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

  2. #12
    Member
    Join Date
    Jun 2012
    Posts
    55
    Thanks Barry.... I'm only testing this stuff with VFP9.. I will eventually be using node.js instead of aspx to server my data "in the json format"......

  3. #13
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    5,767
    Hi Jim, I have fixed that now so it will be available in the next build. If you try it now with SELECT ... INTO HTML myfile.html that should work now.

    I anticipate that we will ship Lianja App Builder RC5.3 and Lianja SQL Server RC5 early next week.
    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

  4. #14
    Member
    Join Date
    Jun 2012
    Posts
    55
    Thanks Barry... 99% of what we will be retrieving from the server will be json.. One quick question... Why can't the result just be returned as a long string? instead of a file "somefile.json" Filetostr() on big text files will slow it down a little.....

  5. #15
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    5,767
    It can. Just write a stored procedure that loads it into a VARCHAR and read it on your client.

    If you want to just do it from a URI, use the Cloud Server and .rsp pages. Very fast and simple.
    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. #16
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    5,767
    Ans the cloud server handles OData calls. Just point at a URI and it all goes back as JSON. Images too are handled and can be data bound into a Web Client.
    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

  7. #17
    Member
    Join Date
    Jun 2012
    Posts
    55
    I know this... was just hoping something like this could be done "Select * from somefile INTO STRINGJSON" LOL....

  8. #18
    Lianja MVP
    Join Date
    Feb 2012
    Location
    Berea, KY, USA
    Posts
    1,940
    Quote Originally Posted by jmonte407 View Post
    I'm an adminstrator on this computer.. the folder is set for "everyone" read/write.. connection is successful.. It works if i'm just creating a cursor.. all the records are returned... but outputs such as HTML.. XML... JSON ... doesnt work,,, just create the cursor as this I just used "select * from inventory"...
    select * from southwind!customers into object myDataObject
    myJsonString = json_encode(myDataObject)

    By and large, Lianja is made for large numbers of users on a server. It saves memory by having only 1 copy of the runtime in memory, using separate memory spaces (multi-tenant) for each user. Using a memory object, then, rather than a file, is a trade-off between memory available for other uses, and speed. In most cases I don't think it will make much difference in memory, as there aren't that many applications where you have 3,000 users hitting a server: it's just something to keep in mind. And of course, it's all able to be tuned.

    hth,

    Hank

  9. #19
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    5,767
    Or as stated here for outputting objects as JSON.
    http://www.lianja.com/doc/index.php/PRINT_JSON()

    Code:
    open database southwind
    select * from shippers into object shipobj
    print_json(shipobj)
    In a .rsp page that will send the JSON straight back to the browser so you would typically use this with an AJAX call.
    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

  10. #20
    Member
    Join Date
    Jun 2012
    Posts
    55
    Just install the latest of everything... I was going to test the Lianja SQL server to see if the select to json stuff worked... however, nothing seemed to happen... then I looked to see if the sql server was running and it was stopped... I clicked start and got this message "Service state was not set"... I rebooted my computer.. looked to see if the sql server was running.. It was running.. so I clicked stop.. then clicked start again... same message .. "Service state was not set" ...

Page 2 of 5 FirstFirst 1234 ... LastLast

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