sqlite - fetch column name from json array -


i need column name json array , ccompare column name sqlite table , have alter table when column name dowsnot exists.

i use code fetch column , column name sqlite code

string searchquery = "select  * " + mytable; cursor cursor = mydatabase.rawquery(searchquery, null ); jsonarray   resultset     = new jsonarray();  cursor.movetofirst(); while (cursor.isafterlast() == false) {     int totalcolumn = cursor.getcolumncount();     jsonobject rowobject = new jsonobject();     for( int i=0 ;  i< totalcolumn ; i++){         cursor.getcolumnname(i); 

here use "cursor.getcolumnname() " column name sqlitetable.

like this possible fetch column name jsonarray example

 cursor.getcolumnname(resultset.getjsonarray(i); 

is possible, else give me solution column name of jsonarray value. have compare column names of jsonarray , sqlite table.


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -