Info

s&mmfc T-^mmmmmtmi SQL is^, db.execSQL(sqi)

ffiTjk .

private void CreateTabl :-() (

SQLiteDatabase db mOpenKelper.getWritableDatabase(); St.ring sql - "CREATE TABLE " + TABLE NAME > " (" + TITLE + " text not null, " ♦ BODY + " text not null " f ");";

a is8-14 A ra 8-15

Log.i <"haiyang:createDB=", sql); try {

db.execSQL("DROP TABLE IF EXISTS diary"); db.execSQL(sql); setTitle("ft4§fcft3)$ &") ; } catch (SQLException e) { setTitle ) )

• db.execSQL("DROPTABLE IF EXISTS diary"JiftfiJii^, ill diary ffiif Ji®

ft «1». w * A-: i. -J ■ t » m m ^«i • * &.+, m m « m # «t- iw «.

• db.cxccSQLisqDu'vf'J^Uf SQL iftfij» Sr^ii&o 8.4.2 ^«JfeSlitftS^--

A-. h h». mirt Android mt mm soutc mmmti /«¿t-KiiMh rm r iff, i'K A. ttMtf+ life. sa-isw«T-MW'. MJttr h\?m

M JtelL^.JM:*^MiWttWiTo /liWf -'Vi'. «if 1 5?*> »U

ft, Ifii ri^^te^^O^^Vl'W^Md^i: -t List View "i'I1, iifiiixi List View mm, m.

iffia^^ii-mifinjw^sijw K*ft.

• ftllfnj DatabaseHelper ill SQLiteDatabase WfiiiMJWNSffiS

• Jff1«fi]flJ Content Values SSWMilfti&M SQL

• tolHlJi.MI SimpleCursorAdapter ListView FEOiitir ListView ffttf./Tv* 1.

/i; Eclipse J I- ex08 2 SQLite J $ I I , J :'Pffiiill K.

• SrfcM -^i® I i o 'T'-.tj File—New—Android Project AS.

• SiSflMS 11 + . Create project from existing source ¿iU

• flci'J ex08 2 SQLite Jfi 11. i&^Afl&fco

- Fifcfiiwwff, 8-nrr/po

0 0

Post a comment