Welcome!

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

Reply
Trusted Contributor
Posts: 178
Registered: ‎02-20-2011
My Device: 8700
My Carrier: at&t

Re: Sqlite pendingOperation in Statement prepare

Did your code work fine in multithread circumstance?
if so, please kindly post your DBHelper completely.
Thanks in advance.

# I tried to change the world, but I couldn't find the source code #



Trusted Contributor
Posts: 141
Registered: ‎02-15-2012
My Device: 9800
My Carrier: Airtel

Re: Sqlite pendingOperation in Statement prepare

Hi, this is my code that I have posted in last comment.

My DBHelper class contains another methods for database handling. What is your requirement, please tell me clearly, otherwise my sample code is already in last post.


Thanks,

Ankit 

 

Press like button,. if you satisfied.

Highlighted
Trusted Contributor
Posts: 178
Registered: ‎02-20-2011
My Device: 8700
My Carrier: at&t

Re: Sqlite pendingOperation in Statement prepare

I post a similar question about prepare() and got solved by invokeLater().
http://supportforums.blackberry.com/t5/Java-Development/statement-prepare-hanged/m-p/1684681#M197084

# I tried to change the world, but I couldn't find the source code #



Trusted Contributor
Posts: 141
Registered: ‎02-15-2012
My Device: 9800
My Carrier: Airtel

Re: Sqlite pendingOperation in Statement prepare

Ok, Follow my code and use like that only. It is working or me very carefully even I am using multithreading,

 

Thanks,

 

Ankit

 

Press like button,. if you satisfied.

Trusted Contributor
Posts: 141
Registered: ‎02-15-2012
My Device: 9800
My Carrier: Airtel

Re: Sqlite pendingOperation in Statement prepare

Hi Thecr0w,

 

                        Can you please show the more code that how you implement the invokeLater for DB transactions.

 

I have used synchronized block around the database opeations.

But still I am getting 'sqlite Pending operation' at statement.prepare(), if calling DB operation from thread.