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

Web and WebWorks Development

Reply
Contributor
joygupta
Posts: 31
Registered: ‎05-06-2011
My Device: 9300
My Carrier: developer
Accepted Solution

Processing SQLite query :-Error defined SQL :-It is working fine in BB OS6.0 bt not in BB OS5.0

Hi,

 

I am a newbee in webworks..

 

I am trying to use SQlite. I am creating a table and accesing the data from it on same page....it is working fine... but when I try to do the same from different page it gives error processing SQL. Now again when I click on the button to access from that page it works fine.

 

i mean the SQL query doesn't work in first time. the second time it works.

 

It is working fine in BB OS6.0 bt not in BB OS5.0

 

Is this a problem of synchronization in 5.0 or something else...?

 

Please let me know the problem. I am stuck.....Please help!!!!!

 

Thanks, Joy Gupta

Please use plain text.
BlackBerry Development Advisor (Retired)
jeffheifetz
Posts: 518
Registered: ‎07-18-2011
My Device: Bold
My Carrier: Rogers

Re: Processing SQLite query :-Error defined SQL :-It is working fine in BB OS6.0 bt not in BB OS5.0

Hi joygupta,

 

Its important to realize that the whole SQL database api is written to be used asynchronously. This means in general to guarantee your code is working you will have to chain your events one after the other. If you look around these forums there are loads of examples of people making small mistakes that were fixed in this way.

 

If you need more help I would suggest posting your code.



1.Please resolve your thread by clicking the "Accept as Solution" button below the post which solved your problem!
2. If any post helps you please click the button below the post(s)
Please use plain text.
Contributor
TheSource
Posts: 14
Registered: ‎09-04-2011
My Device: BlackBerry Bold 9700 + PlayBook

Re: Processing SQLite query :-Error defined SQL :-It is working fine in BB OS6.0 bt not in BB OS5.0

How are you including your Javascript?

 

Do you put it in <script></script> tags at the top of each seperate page or are you seperating it into a single .js file and calling the functions?

 

The first option might cause this behaviour and the second option might solve it.

 

Provide some example code please.

Please use plain text.