Home > Mobile > Run android project always quote (1) no to the table: Data_table errors
Run android project always quote (1) no to the table: Data_table errors
Time:09-22
I was written according to the external database and then import the database steps into the assets folder but has been submitted to the error is can't find the form I put the database file export is to have the table I put the code for find android_metadata (online is the default table) won't go wrong this time table can be found online for all kinds of methods will work This is the query button code single-step tracking to Cursor Cursor=database. The rawQuery (SSQL, null); This step will go wrong and that is the error message when
public void onClick (View v) { The switch (v.g etId ()) { Case R.i db utton3: Zhiling=etext. GetText (). The toString (); The text. The setText (zhiling); SQLiteDatabase database=SQLiteDatabase. OpenDatabase (DB_PATH + DB_NAME, null, SQLiteDatabase. OPEN_READONLY); String SSQL="select * from" + "where" + + KEY_shuju KEY_name + "='" + zhiling +"' "; Cursor Cursor=database. RawQuery (SSQL, null); If (cursor!=null & amp; & Cursor. GetCount () & gt; 0 { While (cursor. MoveToNext ()) { Jieguo=cursor. Get string (cursor. GetColumnIndex (" neirong ")); } Text2. SetText (jieguo); } The else { Text. SetText (" there is no this instruction!" ); Text2. SetText (" "); } break; Case R.i db utton4: Etext. SetText (" "); Text2. SetText (" "); The text. The setText (" "); break; } }
CodePudding user response:
Top a downstairs there is a strange place is I won't an error in my mobile phone really during normal operation when I packed into apk change a mobile phone and I later will be an error with the virtual equipment
CodePudding user response:
That is the bug of the simulator, all will be subject to real machine,