Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 73: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 74: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 75: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 76: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 77: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 78: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
public class DataHelper { private static final String DATABASE_NAME = "Address.db"; private static final int DATABASE_VERSION = 1; private static final String TABLE_NAME = "Contact"; private Context context; private SQLiteDatabase db; private SQLiteStatement insertStmt; private static final String INSERT = "insert into " + TABLE_NAME + "(name) values (?)"; public DataHelper(Context context) { this.context = context; OpenHelper openHelper = new OpenHelper(this.context); this.db = openHelper.getWritableDatabase(); this.insertStmt = this.db.compileStatement(INSERT); } public long insert(String name) { this.insertStmt.bindString(1, name); return this.insertStmt.executeInsert(); } public void deleteAll() { this.db.delete(TABLE_NAME, null, null); } public List selectAll() { List list = new ArrayList(); Cursor cursor = this.db.query(TABLE_NAME, new String[] { "name" }, null, null, null, null, "name desc"); if (cursor.moveToFirst()) { do { list.add(cursor.getString(0)); } while (cursor.moveToNext()); } if (cursor != null && !cursor.isClosed()) { cursor.close(); } return list; } private static class OpenHelper extends SQLiteOpenHelper { OpenHelper(Context context) { super(context, DATABASE_NAME, null, DATABASE_VERSION); } @Override public void onCreate(SQLiteDatabase db) { db.execSQL("CREATE TABLE " + TABLE_NAME + "(id INTEGER PRIMARY KEY, name TEXT)"); } @Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { Log.w("Example", "Upgrading database, this will drop tables and recreate."); db.execSQL("DROP TABLE IF EXISTS " + TABLE_NAME); onCreate(db); } } } public class DatabaseActivity extends Activity { private TextView output1; // private TextView output2; // private TextView output3; private DataHelper dh; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); this.output1 = (TextView) this.findViewById(R.id.Name); // this.output2 = (TextView) this.findViewById(R.id.PhoneNo); // this.output3 = (TextView) this.findViewById(R.id.Email); this.dh = new DataHelper(this); this.dh.deleteAll(); this.dh.insert("Manish"); List names = this.dh.selectAll(); StringBuilder sb = new StringBuilder(); sb.append("Names in database:\n"); for (String name : names) { sb.append(name + "\n"); } Log.d("ADDRESS", "names size - " + names.size()); this.output1.setText(sb.toString()); // this.output2.setText(sb.toString()); // this.output3.setText(sb.toString()); } }