Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

New Member
Posts: 1
Registered: ‎04-20-2011
My Device: Torch
My Carrier: None

Re: Blackberry thread hanging on SQLite statement prepare



This solved for me


first you need to be running sqlite code on a thread , inside where you are going to use the db code.



 synchronized (UiApplication.getEventLock()) {
     Statement st = db.createStatement("SELECT NOME FROM Table");






Regular Contributor
Posts: 53
Registered: ‎08-27-2013
My Device: none
My Carrier: none

Re: Blackberry thread hanging on SQLite statement prepare

I just had the same problem and it seems that the first select statements were about to be prepared before the database was created properly (the file was there, but the create statements for tables hadnt been processed yet), so I copied a working database file from a real device and the app is working fine now in the simulator. Maybe this can be of help if someone encounters this issue again.