android - Inserting a bunch of data trough the Content Provider -


i inserted huge resultsets tables (i using sqlite) this:

public void insertrsdata(resultset rs) throws sqlexception {     this.mdb.begintransaction();     try {         this.mdb.delete(database_table, null, null);         while (rs.next()) {             contentvalues cv = new contentvalues();             cv.put(row_id, rs.getint("id"));             cv.put(row_name, rs.getstring("name"));             date dnow = new date();             cv.put(row_date_upd, dnow.tostring());             this.mdb.insert(database_table, null, cv);         }         this.mdb.settransactionsuccessful();     } {         this.mdb.endtransaction();     } } 

initially got data in resultset. transactions helping me insert bunch of records fast.

now want use content provider in program, , thinking how implement methods it.

so how should insert records in tables? one-by-one?

can pass (if right way) resultset content provider insert records?

override bulkinsert in contentprovider


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -