Hugo Silva

Greenhorn
+ Follow
since Sep 24, 2017
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Hugo Silva

yes it can be, what i'm trying to see is how the structure of the code works tkx
6 years ago
Hi i' learning java and still looking to see how it works,

i have this code and before it creats the table i want to open a msg box with just ok Bottom, can someone help me please. thank you


Public class Databasehelper extends SQLiteOpenHelper {

   public static final String Database_Name = "dicionarios.db";
   public static final String Table_Name    = "dcpteng";
// definicao de colunas

   public static final String Col_id = "ID";
   public static final String Col_pt = "PT";
   public static final String Col_eng = "ENG";
   public static final String Col_desc = "DESC";




   public Databasehelper(Context context) {
       super(context, Database_Name, null, 1);
       SQLiteDatabase db = this.getWritableDatabase();
   }

   @Override
   public void onCreate(SQLiteDatabase db) {


       db.execSQL("create table " + Table_Name +" (id integer primary key autoincrement, name texr,surname text)");
   }

   @Override
   public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

       db.execSQL("drop database if exists" + Database_Name);
       onCreate(db);
   }
}
6 years ago