create indexedDB dataset fieldDefs

Hi,


regarding about the dynamically creating indexedDB dataset fielddefs , i have not yet completely get a success ,so the following ways is a right method ?

1. clone the fieldDefs from WebClientDataset ,
    i have similar structure in WebClientDataset and what i did was 
      
      indexedDBdataset.fieldDefs := WebClientDataset.fieldDefs ; 
      indexedDBdataset.open ;

      at my console/application/storage tab, i cannot see the table is been created ,
      at my console , i got IndexedDB: Internal error, DoGetData entry with 
      these conditions not possible. i think it came from when i tried to open the indexedDBDataset.
      why was this ?

2. clone the fieldDefs by copy the structure one by one using loop something like the following ,
   for _i := 1 to sourceDataset.FieldDefs.Count do begin
          destIDBDataset.FieldDefs.Add(
                         sourceDataset.FieldDefs.Items[_i-1].Name,
                          sourceDataset.FieldDefs.Items[_i-1].DataType ) ;
    end ;
   
   destIDBDataset.Indexes.Add('PKey','id',[ixPrimary]);
   destIDBDataset.ActiveIndex := 'PKey';

   destIDBDataset.Open;

    the table created above using dynamic fieldDEFs  , 
    showed up at my console/application/indexed storage but even after i called the 
    Open dataset , it still showed inactive , why ?

3. follow the TMS webcore demo example  but mixed with method 2 above, where
    i defined the field defs during my data module onCreate but my dynamic create
    fieldDefs was called later when the other dataset has loaded , somehow , when i did this
    this is the result , 
   
    at console / application / indexeddb , only show the indexeddb dataset table created by
    hard coded way like demo , the dynamically created indexedDbDataset won't show up.

4, there are also weird situation , where , i used the indexedDB dataset to create new record
    and it showed at my dbGrid and also i did show message for the recordcount and it indeed
    confirmed that there are records in the indexeddb dataset table , but the records just won't
    show up at my Chrome console/application/storage indexedDB tab ,

5. it also seems that not sure where it came from , at the console , i got these message 
     IndexedDB: Internal error, DoGetData entry with these conditions not possible.

    IndexedDB Warning: AddIndex commands ignored for existing database.
    versioning issues of indexeddb ? 

   

Would like to ask for advice regarding about the proper usage of indexeddb .