Results 1 to 2 of 2

Thread: rsJSON = myDB.query(SQL, {json:true})

  1. #1
    Sencha Premium User
    Join Date
    Jun 2011
    Location
    Perth, Western Australia
    Posts
    180
    Vote Rating
    7
      0  

    Default rsJSON = myDB.query(SQL, {json:true})

    Hi All
    1stly: Sencha is a brain stretch for me. So thanks to all those who have helped others in this forum!

    I want to connect to an MS Access db on my site, load the data (using a query) into a JSON store, then dynamically create list items.

    I am ok with the "dynamically create list items" but ...

    Has someone got some clues for me:
    I have read that I can load a JSON Store like this

    var myDB = new ACCESSdb("/Downloads/data/Knowledge.mdb", {showErrors:true});
    var SQL = "SELECT * FROM FAQ";
    var resultSet = myDB.query(SQL);
    var rsJSON = myDB.query(SQL, {json:true});

    Assuming that works (and I have defined a MODEL) ... How do I then correctly describe this store in Sencha

    stores.FAQStore = new Ext.data.Store({
    id: 'stores-faqstore',
    model: 'models.FAQModel',
    autoLoad: true,
    ?????
    ?????
    ?????
    }
    });

    THX
    Roger

  2. #2
    Sencha Premium User
    Join Date
    Jun 2011
    Location
    Perth, Western Australia
    Posts
    180
    Vote Rating
    7
      0  

    Default follow up

    is it as simple as ...

    stores.FAQStore = new Ext.data.Store({
    id: 'stores-faqstore',
    model: 'models.FAQModel',
    autoLoad: true,
    data: rsJSON
    });

    ???

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •