Ok,

I think I have been able to resolve this now :) Took a look at the notepad demo and that helped a lot.

One other question, once I have my database and I start to create tables for it and programatically start to populate these tables with data, is there any way (any tool) that I can take a look at the table contents so I can check that my code is populating the data in my tables as I'd expect? Obviously I can use my app to display information, but was curious if there was any other way to view the data.

TIA.
------------------------------------------------------------------------

David Williams
Check out our WebOS mobile phone app for the Palm Pre and Pixi:
<http://www.dtw-consulting.com/GolfCaddie> Golf Caddie <http://www.dtw-consulting.com/GolfCaddie> | Golf Caddie Forum <http://www.dtw-consulting.com/GolfCaddie/forum> | Golf Caddie FAQ <http://www.dtw-consulting.com/GolfCaddie/faq.html> by DTW-Consulting, Inc.



On 3/13/2011 8:46 PM, David Williams wrote:
All,

I am trying to create an SQLite DB but for some reason it's not working.
My logic performs the following.

    db.openDatabase(GlobalVars.DATABASE_NAME, null, 0);

This simply tries to open my DB. If the DB doesn't exist it will throw an exception, which I can check, but I would suspect that if the DB can't be opened it doesn't exist, therefore my assumption then is that this is a new install of my app and I need to create my DB. So, in my exception I am doing the following:

    db.openOrCreateDatabase(GlobalVars.DATABASE_NAME, null);

I'd expect the above command to create the database regardless, but it isn't. The exception I am getting for both of the above commands is: *unable to open database file. *I am surprised am I getting this in the second exception as I would expect it to create the DB.

DATABASE_NAME = "golfcaddie.db"

What am I doing wrong?


--
------------------------------------------------------------------------

David Williams
Check out our WebOS mobile phone app for the Palm Pre and Pixi:
<http://www.dtw-consulting.com/GolfCaddie> Golf Caddie <http://www.dtw-consulting.com/GolfCaddie> | Golf Caddie Forum <http://www.dtw-consulting.com/GolfCaddie/forum> | Golf Caddie FAQ <http://www.dtw-consulting.com/GolfCaddie/faq.html> by DTW-Consulting, Inc.


--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

<<inline: GClogo.png>>

<<image/png>>

Reply via email to