Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 5 of 5 total
Thread Reading local json file to populate a dataset - How to?
Fri, Oct 16 2015 6:04 AMPermanent Link

Bill

Hi all,
I'm writing an easy app to see a list of questions and answers, a sort of local app for tablet/phone/pc to see some, defined and immutable, FAQs that I would like to works without network support.
I would like to load a local dataset from local data that I have in json format setted in my app.
How can I get the json string from a local file to use in myDataset.LoadRows() method?
Thanks in advance.
Fri, Oct 16 2015 7:01 AMPermanent Link

Matthew Jones

AmjCharlson wrote:

> I'm writing an easy app to see a list of questions and answers, a
> sort of local app for tablet/phone/pc to see some, defined and
> immutable, FAQs that I would like to works without network support.
> I would like to load a local dataset from local data that I have in
> json format setted in my app.  How can I get the json string from a
> local file to use in myDataset.LoadRows() method?

That's a big question. How is the app going to get to the device? If
the user will open the page one time from a server, then the app can
get the content from a file on the server, and store it in
LocalStorage. It can then use that stored data any time it wants, and
never has to go back to the server.

That's the easy way, if you are loading from the web. If not, then you
are talking PhoneGap or some other custom server... More details needed
if that is the case.

--

Matthew Jones
Fri, Oct 16 2015 7:48 AMPermanent Link

D.C.

Hi,
If the JSON is fixed, why not hard code it in a variable, tstringlist or a invisible memo?

myDataset.LoadRows(MultiLineEdit1.Lines)

Regards
Diego
Fri, Oct 16 2015 7:53 AMPermanent Link

D.C.

D.C. wrote:

Hi,
If the JSON is fixed, why not hard code it in a variable, tstringlist or a invisible memo?

myDataset.LoadRows(MultiLineEdit1.Lines.Text)

Regards
Diego
Fri, Oct 16 2015 12:17 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

<< I'm writing an easy app to see a list of questions and answers, a sort of local app for tablet/phone/pc to see some, defined and immutable, FAQs that I would like to works without network support.
I would like to load a local dataset from local data that I have in json format setted in my app.
How can I get the json string from a local file to use in myDataset.LoadRows() method? >>

Please see the DataBound example project for more information on how to do this.

Tim Young
Elevate Software
www.elevatesoft.com
Image