0

I'm new in Mobile programming and I want to find how to store data from json in sqlite the json file will be send from the server,so how can i get it and insert data to sqlite i'm using phonegap and jquerymobile and my application is hybrid. my json file:

{
  "flux": {
    "typeflux": "virement",
        "contenu": {
      "cours": [
        {

        {
          "-date": "02/01/2011",
          "value": [
            {
              "-devise": "USD",
              "-achat": "2.2477",
              "-vente": "3.2477"
            },

            {
              "-devise": "EUR",
              "-achat": "2.2477",
              "-vente": "3.2314"
            }

          ]}
      ]}
  }}
Peter Aron Zentai
  • 11,482
  • 5
  • 41
  • 71
user1393958
  • 35
  • 2
  • 8
  • Here's how to use databases from PhoneGap: http://docs.phonegap.com/en/1.2.0/phonegap_storage_storage.md.html However, the question is too vague to answer in any more detail. – Amadan May 15 '12 at 10:03
  • thanks. i have a json file and i want to insert data from the file into sqlite.my app is hybrid( for ios,android,symbian..)so i can use only html, javascript – user1393958 May 15 '12 at 10:09
  • Yeah, you just said the same thing as before, that's not really any less vague. "Hi, I have some groceries, how do I cook lunch?" How about saying a word about what exactly you have in your fridge, eh? What does the JSON in question look like? – Amadan May 15 '12 at 10:10
  • i need to insert date,devise,achat,vente from json into TABLE VIREMENT (DATE_COURS DATE, LIB_DEVISES TEXT, BID TEXT, ASK TEXT)'); – user1393958 May 15 '12 at 10:16

1 Answers1

1

I do believe JayData is what you are looking for. It helps you to manage data in hybrid applications regarding webSql/sqLite data or online datasources - all with JavaScript. There is also a getting started tutorial, that shows how to use sqLite with JayData in a phonegap application.

Peter Aron Zentai
  • 11,482
  • 5
  • 41
  • 71