P. 1
String Database

String Database

|Views: 0|Likes:

More info:

Published by: Dário Cândido de Oliveira on Jun 05, 2011
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOCX, PDF, TXT or read online from Scribd
See more
See less

08/18/2014

pdf

text

original

String DATABASE_NAME = "Agenda"; final String TABLE_NAME = "Cadastros" ; finalSQLiteDatabase myDB = getApplicationContext().

openOrCreateDatabase(DATABASE_NAME, MODE_PRIVAT E,null); final String texto = null,data = null; myDB.execSQL( "CREATE TABLE IF NOT EXISTS " +TABLE_NAME+ " (id INT PRIMARY KEY AUTO_INCREMENT, nome VARCHAR(80), endereco VARCHAR(80), telefone VARCHAR(80), cidade VARCHAR(80));" );

myDB.execSQL("INSERT INTO " + TABLE_NAME + " (nome, endereco, telefone, cidade)"+ " VALUES " + "('" + nome + "', " + "'" + endereco + "'"+ "'" + telefone + "''" + cidade + "');");

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->