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
ashish117
Posts: 40
Registered: ‎07-20-2010
My Device: Not Specified
Accepted Solution

simulated SDCard

Hey,

 

I am getting started with developing a sqlite application. I have the source code that is on BlackBerry.com. I have built the code, requested the sign in key.

 

I am trying to go to the SDCard and see whether the file has been created or not. Bascially, I want to browse the simulated SDCard.

 

On the simulator I have clicked Simulate->Change SDCard and provided the name of a file and path. I can see a .dmp file but when I click on it, it opens in Visual Studio.

 

Thanks a lot.

Please use plain text.
Developer
BB-Dude
Posts: 516
Registered: ‎07-23-2010
My Device: 9900

Re: simulated SDCard

Try using the BlackBerry File Browser, if you are using the 5.0 OS Simulator, to browse the SD Card.

Please use plain text.
Developer
StevenKader
Posts: 644
Registered: ‎02-03-2010
My Device: Z10 LE

Re: simulated SDCard

When you select Simulate->Change SDCard you should select "Add Directory" and then select a new empty directory on your drive.  This is where all of the files that you create will go from the simulated app.  Keep in mind that you want to read these same files back you need to select the same directory the next time.  You could create a runtime confirmation and set the directory once.  I've enclosed a picture to show you where you can find that.

 

Hope that helps.


Steven Kader at JaredCo
   Follow me on Twitter    |     Mipixi.com :  Web App for Photo Sharing
Please use plain text.
Developer
ashish117
Posts: 40
Registered: ‎07-20-2010
My Device: Not Specified

Re: simulated SDCard

Hi,

all those solutions worked. i can now view the database by going to the media folder on the simulator and also the folder on my pc. thanks a lot for your help.

 

i am trying to create a database, open it and then insert data into the database.

 

        try
        {
            URI myURI = URI.create("file:///SDCard/Databases/SQLite_Guide/" +
                                   "MyTestDatabase.db");
            d = DatabaseFactory.create(myURI);
            d= DatabaseFactory.open(myURI);
            
           Statement st = d.createStatement("INSERT INTO People(Name,Age) " +
                                             "VALUES ('John',37)");
            st.prepare();
            st.execute();
            st.close();
            d.close();

        }

 

 

however, i do not see anything inside the database (when i open it using firefox sqlite manager).

 

 

thanks again

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

Re: simulated SDCard

Have you single step debugged through it to make sure there are no Exceptions?

 

Sorry don't know the answer to your question, but since you have the answer to the initial question about SD Card, can i suggest that you mark one of the answers as the solution, and start a new Thread with your new problem?

 

Cheers

Please use plain text.