local database means sqlite database you have created taht one or any other?
i have post below code it might be help you.
-----------------------------------------------------see code
below-------------------------------------
Sqlite3 use in android
******** database creation***************
SQLiteDatabase db;
db=openOrCreateDatabase("sip_db.db",SQLiteDatabase.CREATE_IF_NECESSARY,null);
db.setVersion(1);
db.setLocale(Locale.getDefault());
db.setLockingEnabled(true);
************* create table*****************
final String str ="CREATE TABLE history ("+ "id INTEGER PRIMARY KEY
AUTOINCREMENT,"+ "contact_num TEXT,"+ "call_time TEXT,”call_stime TEXT);";
db.execSQL(str);
****************** insert data ******************
String ins="INSERT INTO history (contact_num)values('9638095998')";
db.execSQL(ins);
******************* get all the data *******************
Cursor cur = db.query("tbl_countries",
null, null, null, null, null, null);
cur.moveToFirst();
while (cur.isAfterLast() == false) {
view.append("\n" + cur.getString(0)+"\t"+cur.getString(1));
cur.moveToNext();
}
cur.close();
On Fri, Feb 24, 2012 at 8:38 AM, nunna narendra android developer <
[email protected]> wrote:
> when i am trying to fetch the data from local database it is not
> working how can i solve this problem plz help me .
>
> --
> 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