Re: [android-developers] problem with access to a database file

2012-05-04 Thread Mady Zaid
انا ممكن ابعتلك الكود اللى يحل مشكلتك اذا تحب
On May 1, 2012 12:13 AM, Tareq Al-Ma'mari tariq.mam...@gmail.com wrote:

 Hi ,

 How can I use and access a database file (.db) ?
 I've tried many ways but nothing works ,
 the problem is when I try to open a database file the application crashed
 ,
 so I've tried to check if the database file is exist :

 File database = context.getDatabasePath(maindb.db);
 database.exists(); // false
 database.getPath(); // this gives me the path
 data/data/MY_Package/databases/maindb.db
 database.isFile() ; // false

 //
 this is my open command
 if(database.exists())
 {
  myDb=SQLiteDatabase.openDatabase(DB_NAME, null,
 SQLiteDatabase.NO_LOCALIZED_COLLATORS);
 }

 please I need help , I'm so tired ,
 I've been searching for a long time

 yours,
 Tareq


 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] problem with access to a database file

2012-04-30 Thread Tareq Al-Ma'mari
Hi ,

How can I use and access a database file (.db) ?
I've tried many ways but nothing works ,
the problem is when I try to open a database file the application crashed ,
so I've tried to check if the database file is exist :

File database = context.getDatabasePath(maindb.db);
database.exists(); // false
database.getPath(); // this gives me the path
data/data/MY_Package/databases/maindb.db
database.isFile() ; // false

//
this is my open command
if(database.exists())
{
myDb=SQLiteDatabase.openDatabase(DB_NAME, null,
SQLiteDatabase.NO_LOCALIZED_COLLATORS);
}

please I need help , I'm so tired ,
I've been searching for a long time

yours,
Tareq

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

Re: [android-developers] problem with access to a database file

2012-04-30 Thread Justin Anderson
http://lmgtfy.com/?q=android+database+tutorial

Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Mon, Apr 30, 2012 at 4:12 PM, Tareq Al-Ma'mari tariq.mam...@gmail.comwrote:

 Hi ,

 How can I use and access a database file (.db) ?
 I've tried many ways but nothing works ,
 the problem is when I try to open a database file the application crashed
 ,
 so I've tried to check if the database file is exist :

 File database = context.getDatabasePath(maindb.db);
 database.exists(); // false
 database.getPath(); // this gives me the path
 data/data/MY_Package/databases/maindb.db
 database.isFile() ; // false

 //
 this is my open command
 if(database.exists())
 {
  myDb=SQLiteDatabase.openDatabase(DB_NAME, null,
 SQLiteDatabase.NO_LOCALIZED_COLLATORS);
 }

 please I need help , I'm so tired ,
 I've been searching for a long time

 yours,
 Tareq


 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en