I am not on my computer at the moment. I will investigate and get back to you when I am.
Printable View
I am not on my computer at the moment. I will investigate and get back to you when I am.
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"......
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.
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.....
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.
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.
I know this... was just hoping something like this could be done "Select * from somefile INTO STRINGJSON" LOL....
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
Or as stated here for outputting objects as JSON.
http://www.lianja.com/doc/index.php/PRINT_JSON()
In a .rsp page that will send the JSON straight back to the browser so you would typically use this with an AJAX call.Code:open database southwind
select * from shippers into object shipobj
print_json(shipobj)
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" ...