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
Developer
AbeesMuhammed
Posts: 49
Registered: ‎05-20-2009
My Device: Not Specified

File Connection Isuue with BlackBerryJDE 5.0

 Hi all,

 

 

I have an issue while opening a file in JDE 5.0.I have a database file in sd card.when i checking that db file exists or not im always getting  'false' as a result ,if the db file exists so.Im using

FileConnection fc = (FileConnection) Connector.open(dbPath.value + dbFileName , Connector.READ); method to open the file and fc.exists() method to check the file exists or not.How to solve this issue.

 

Thanks,

AbeesMuhammed.

Please use plain text.
Developer
peter_strange
Posts: 19,607
Registered: ‎07-14-2008
My Device: Not Specified

Re: File Connection Issue with BlackBerryJDE 5.0

Have a look at the SQLite demo that comes with samples for OS 5.0.  It checks for the existence of the database file and it seems to work.  If you compare that code with what you have, I suspect you will find your bug. 

Please use plain text.
Developer
AbeesMuhammed
Posts: 49
Registered: ‎05-20-2009
My Device: Not Specified

Re: File Connection Issue with BlackBerryJDE 5.0

Hi,

 

 

Im using Perst Database and im checking for perstdb file existence.

fc = (FileConnection) Connector.open("file:///SDCard/database.dbs",Connector.READ");

if(fc.exists()) gives false always ,if perst file exists

Thanks.

 

.

Please use plain text.