• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Jeanne Boyarsky
Saloon Keepers:
  • Stephan van Hulst
  • Carey Brown
  • Tim Holloway
  • Piet Souris
Bartenders:

Insert a msg box in the code

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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);
   }
}
 
Rancher
Posts: 4936
38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

want to open a msg box


Would a Toast work?
Or try an AlertDialog if you want a modal display.
 
Hugo Silva
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yes it can be, what i'm trying to see is how the structure of the code works tkx
 
There's a way to do it better - find it. -Edison. A better tiny ad:
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
https://www.kickstarter.com/projects/paulwheaton/low-tech
reply
    Bookmark Topic Watch Topic
  • New Topic