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
Regular Contributor
Posts: 83
Registered: ‎05-24-2011
My Device: Storm 9550
My Carrier: XXX

Reading an empty entry from an sqlite database

Hi all,


I have been dealing with a problem on and off with my app that I would like to get resolve once and for all. When I read an empty entry from a sqlite database, often my program doesn't recognize the value is empty and act appropriately. I have a default value set in my code, and only change it if the value is not null by using this code:


if(row.getObject(0) != null)

 value = row.getString(0);


the default value for "value" is "". Why is it, when the cell is empty, that the if statement becomes true?

Highlighted
Developer
Posts: 112
Registered: ‎05-20-2011
My Device: 9800
My Carrier: Developer

Re: Reading an empty entry from an sqlite database

once check how to store the values means insert atatement.

let me know the code for insertion

 

thank you