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

Native Development

Reply
Developer
Posts: 358
Registered: ‎04-13-2013
My Device: Z10
My Carrier: Telus
Accepted Solution

SQL search issue

I've setup an SQL db in my app and the search works really great.  I have the onTextChanged and onTextChanging set to:

 

datasource.query = "Select * from items where name like searchtext.text"

 I'm essentially getting the database to load and reload based on the search text changing.

 

Issue I'm having is that when the user deletes a search term and the field becomes empty or when I set the search text to empty upon making the textfield visible = false.

 

After this is done whenever I try to add or update the database my app hangs.  I've tried setting the databse list to refresh/ reload upon closign the textfield but that doesn't seem to help.

 

Any clue what I can do? 

Highlighted
Developer
Posts: 358
Registered: ‎04-13-2013
My Device: Z10
My Carrier: Telus

Re: SQL search issue

Found the issue to be a little more involved than jsut my search query.  It ended up being because my list index was out of range.  For more information check out the answers and solution in this thread for how I solved it:  http://supportforums.blackberry.com/t5/Native-Development/quot-Index-out-of-range-quot-error-on-sear...