Max number of entries per table for SQLiteDatabase Content Provider

by wnafee » Sat, 17 Jul 2010 02:23:45 GMT


Sponsored Links
 Hi,

I have an application that has a Content Provider with an
SQLiteDatabase. I noticed that my tables don't get any new row entries
inserted after i reach index number 1000.

I ran this on 2 different phones and noticed that they both stopped
adding new entries after 1000. Is this a limitation that is documented
somewhere or is there something wrong with my code?

Thanks in advance.

--



Max number of entries per table for SQLiteDatabase Content Provider

by Zsolt Vasvari » Sat, 17 Jul 2010 10:47:45 GMT


 That is certainly not the case.  My app has many thousands of rows of
data.




--


Sponsored Links


Other Threads

1. Problem in Contacts restoring

Hi, All I have developing  one application in that I am sending
contacts to server and restoring them back to mobile. I have stored
contacts to server successfully but there is problem in restoring them
back to mobile. One of my method throws NullPointerException while
restoring. The method is

public void doImport(final String fileName, final boolean replace,
final App app) {
                try {
                        System.out.println ("Inside try block of doImport ()
method");

                        vcfFile = new File(fileName);
                        System.out.println ("After creating file");

                        final BufferedReader vcfBuffer = new
BufferedReader(new FileReader(vcfFile));

                        System.out.println ("Before calculating
size");
                        final long maxlen = vcfFile.length();

                        System.out.println ("%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%"+maxlen);

                // Start lengthy operation in a background thread
                        new Thread(new Runnable() {
                     public void run() {
                        long importStatus = 0;

                        synchronized (syncMonitor) {
                                mAction = Action.IMPORT;
                                syncFileName = fileName;
                                }

                        showNotification();
                        SQLiteDatabase db =
mOpenHelper.getWritableDatabase();
                        SQLiteStatement querySyncId =
db.compileStatement("SELECT " + SYNCID + " FROM " +
SYNCDATA_TABLE_NAME + " WHERE " + PERSONID + "=?");
                        System.out.println
("****"+querySyncId.getUniqueId());
                        SQLiteStatement queryPersonId =
db.compileStatement("SELECT " + PERSONID + " FROM " +
SYNCDATA_TABLE_NAME + " WHERE " + SYNCID + "=?");
                        System.out.println
("****"+queryPersonId.getUniqueId());
                        SQLiteStatement insertSyncId =
db.compileStatement("INSERT INTO  " + SYNCDATA_TABLE_NAME + " (" +
PERSONID + "," + SYNCID + ") VALUES (?,?)");
                        System.out.println
("****"+insertSyncId.getUniqueId());
                        Contact parseContact = new
Contact(querySyncId, queryPersonId, insertSyncId);//Iam getting
parseContact as a null
                                try {
                                        long ret = 0;
                                        do  {
                                                System.out.println ("Inside
do");
                                                System.out.println
("**************"+parseContact.firstName);
                                                System.out.println
("**************"+parseContact.emails);
                                                System.out.println
("________________"+parseContact.displayName);
                                                System.out.println
("******************"+parseContact.notes);
                                                System.out.println
("************************"+vcfBuffer.read());
                                                ret =
parseContact.parseVCard(vcfBuffer);
                                                if (ret >= 0) {
 
parseContact.addContact(getApplicationContext(), 0, replace);
                                                        importStatus
+= parseContact.getParseLen();

                                                        // Update the
progress bar
                                     app.updateProgress((int) (100 *
importStatus / maxlen));
                                                }
                                        } while (ret > 0);


                                        db.close();
                                        app.updateProgress(100);
                                synchronized (syncMonitor) {
                                        mAction = Action.IDLE;
                                        showNotification();
                                }
                                stopSelf();
                                } catch (IOException e) {
                                }
                     }
                 }).start();


                } catch (FileNotFoundException e) {
                        app.updateStatus("File not found: " +
e.getMessage());
                }
    }

LogCat generates following error message

06-22 09:58:06.577: INFO/System.out(652): %%%%%%%%%%%%%%%%%%%%%%%%%
%Inside readWebPage method
06-22 09:58:08.827: INFO/global(652): Default buffer size used in
BufferedReader constructor. It would be better to be explicit if an 8k-
char buffer is required.
06-22 09:58:08.827: INFO/System.out(652): Before while
06-22 09:58:08.837: INFO/System.out(652): ####################667
06-22 09:58:08.837: INFO/System.out(652): Name of file is%%%%%%%%/
sdcard/contactBackup.vcf
06-22 09:58:08.837: INFO/System.out(652): Inside try block of doImport
() method
06-22 09:58:08.837: INFO/System.out(652): After creating file
06-22 09:58:08.837: INFO/global(652): Default buffer size used in
BufferedReader constructor. It would be better to be explicit if an 8k-
char buffer is required.
06-22 09:58:08.837: INFO/System.out(652): Before calculating size
06-22 09:58:08.837: INFO/System.out(652): %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%667
06-22 09:58:08.927: INFO/System.out(652): ****3772424
06-22 09:58:08.927: INFO/System.out(652): ****3776576
06-22 09:58:08.927: INFO/System.out(652): ****3776032
06-22 09:58:08.937: INFO/System.out(652): Inside do
06-22 09:58:08.937: INFO/System.out(652): **************null
06-22 09:58:08.937: INFO/System.out(652): **************[]
06-22 09:58:08.937: INFO/System.out(652): ________________null
06-22 09:58:08.937: WARN/dalvikvm(652): threadid=13: thread exiting
with uncaught exception (group=0x4001b180)
06-22 09:58:08.937: ERROR/AndroidRuntime(652): Uncaught handler:
thread Thread-7 exiting due to uncaught exception
06-22 09:58:08.937: ERROR/AndroidRuntime(652):
java.lang.NullPointerException
06-22 09:58:08.937: ERROR/AndroidRuntime(652):     at
com.android.internal.os.LoggingPrintStream.println(LoggingPrintStream.java:
243)
06-22 09:58:08.937: ERROR/AndroidRuntime(652):     at vcard.io.VCardIO
$1.run(VCardIO.java:206)
06-22 09:58:08.937: ERROR/AndroidRuntime(652):     at
java.lang.Thread.run(Thread.java:1096)

Contact parseContact = new Contact(querySyncId, queryPersonId,
insertSyncId); Here is problem. Somebody tell me what is problem
Thanks in advance.

-- 

2. Transparent textures in OpenGL ES.. How?

I can't seem to get GLUtils.texImage2D to use my full RGBA (A=my alpha
component). I've tried doing setEGLConfigChooser(8, 8, 8, 8, 0, 0);
getHolder().setFormat(PixelFormat.RGBA_8888);

I've tried converting the source image (.png in ARGB) to RGBA.. which
works ok for the ordering of data before texImage2D, but when it
draws, it draws yellow where it should be "transparent white"... which
suggests it's diminishing the "B"(blue) component instead of the
A(alpha) component. But the same thing happens when I just use the
orignal ARGB data instead ("B" diminishes instead of "A", leaving
yellow). I have no idea why but I'll keep trying, but has anybody done
this properly and has the answer?

-- 

3. Accessories HTC Desire, Google Nexus One, Motorola Milestone - Motorola Droid, Samsung Galaxy Spica, Universal USB Car Charger.

4. Native codes do not respect Overriding

5. READ_PHONE_STATE and WRITE_EXTERNAL_STORAGE automatically required?

6. VM aborted and Framework disconnected

7. Accessories HTC Desire, Google Nexus One, Motorola Milestone - Motorola Droid, Samsung Galaxy Spica, Universal USB Car Charger