You shouldn't have to change the database directory permissions
manually...getWritableDatabase() should do that for you.
Infact that is what it does in the Notepad tutorial. I don't see the create
database script being executed from your DBHelper.onCreate() method.
Is this database being created in the same app that you are using it from?

On Thu, Aug 21, 2008 at 2:31 AM, 6real <[EMAIL PROTECTED]> wrote:

>
> Actually the issu was ...; in the rights attributed to the databases
> directory !!!
>
> I have changed the right thanks to a chmod 777 and now it works fine !
>
> I don't understand which user is used when laucnhing the app but my
> issu is solved. I hope I wont have the same issu on final telephone !
>
>
>
> 6real wrote:
> > Still not work :-(
> >
> > I have changes the method to copy the tutorial.
> > Actually it seems the onCreate method is never called, even when I
> > call getWritable or getReadable !
> >
> > I saw this behaviour thanks to breakpoints in debug mode.
> >
> > Nobody as such issues ?
> >
> > On Aug 21, 9:17�am, 6real <[EMAIL PROTECTED]> wrote:
> > > Thanks!
> > >
> > > I am gonna watch. I didn't know that.
> > >
> > > Rgds
> > >
> > > C.
> > >
> > > On Aug 20, 11:43�pm, "Megha Joshi" <[EMAIL PROTECTED]> wrote:
> > >
> > > > Can you compare your code against the NotePad tutorial and see ,
> NotePad
> > > > tutorial uses SQliteOpenHelper...
> > >
> > > > On Wed, Aug 20, 2008 at 11:10 AM, 6real <[EMAIL PROTECTED]>
> wrote:
> > >
> > > > > Dear all,
> > >
> > > > > I am facing an issue (probably simple to solve!) while migrating my
> > > > > app under the last 0.9.
> > >
> > > > > Before I was creating and then opening a database.
> > >
> > > > > In teh doc I read I saw that now I need to create a class that
> > > > > inheriths from SQLiteOpenHelper.
> > >
> > > > > This is what I have done (anonymous class inside a new one) :
> > > > > ------------------
> > > > > � �class MyDBHelper extends SQLiteOpenHelper {
> > >
> > > > > � � � �public MyDBHelper(Context context, String name,
> CursorFactory
> > > > > factory, int version) {
> > > > > � � � � � �super(context, name, factory, version);
> > > > > � � � �}
> > >
> > > > > � � � �public void onCreate(SQLiteDatabase db) {
> > > > > � � � � � �return;
> > > > > � � � �}
> > >
> > > > > � � � �public void onUpgrade(SQLiteDatabase db, int oldVersion, int
> > > > > newVersion) {
> > > > > � � � � � �return;
> > > > > � � � �}
> > >
> > > > > � �}
> > >
> > > > > ----------------
> > >
> > > > > Then I instanciate this class
> > >
> > > > > �dbHelper = new MyDBHelper(launched, Constant.DB_DATABASE_NAME,
> null,
> > > > > Constant.DB_VERSION);
> > >
> > > > > -----------------
> > >
> > > > > Now comes the issue, I'd like to execute a SQL request to my DB :
> > > > > myDB = dbHelper.getWritableDatabase();
> > > > > � � � � � �myDB.execSQL("DELETE FROM " + Constant.DB_TABLE_STATIONS
> +
> > > > > " WHERE " + Constant.DB_FIELD_S_NETWORK + "='" + network + "';");
> > >
> > > > > And I have this error ?
> > >
> > > > > 08-20 18:07:41.119: ERROR/Database(172):
> sqlite3_open_v2("/data/data/
> > > > > com.xirgonium.android/databases/myDB", &handle, 6, NULL) failed
> > >
> > > > > ------------------
> > >
> > > > > Do you have an idea of the origin ??
> > >
> > > > > Thanks a lot for your help !
> >
>

--~--~---------~--~----~------------~-------~--~----~
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]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to