• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps SQLite Programming

Lyncheese

Lurker
Jul 23, 2013
5
0
Hello, i have tried many tutorial and always find the same problems. I dont know why but somehow my adt didnt create any database folder.

Here is the code i used :

package com.example.test;

import android.app.Activity;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
import android.util.Log;

public class haha extends Activity{

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

SQLiteDatabase db = openOrCreateDatabase("MyDB", MODE_PRIVATE, null);
db.execSQL("CREATE TABLE IF NOT EXISTS Haha (Email VARCHAR, FirstName VARCHAR, LastName VARCHAR);");
db.execSQL("INSERT INTO Haha VALUES('haha.com','anita','bobo');");
db.close();
}
}

My problem is, i cant find databases folder from file explorer through DDMS.



Any clue ???

THX before
 

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones