java - Executing SQL in SQLite on the Android SDK -


So I've just completed it and it works great, but when I read data from my database, I'm stuck somewhere.

I am now thanking the database file, but I am now looking for a method that will allow me to return the value of a field. Or at least one way that lets me execute SQL

The closest I am calling this is:

  public list & lt; String & gt; Select all () {list & lt; String & gt; List = New Arrestist & lt; String & gt; (); Cursor cursor = myDataBase.rawQuery ("select * from Android tablet", blank); If (cursor.moveToFirst ()) {do {list.add (cursor.getString (0)); } While (cursor.movetoonext ()); } If (cursor! = Null & amp; cursor.iccllast ()) {cursor.close (); } Return list; }  

But it only throws a SQLiteException:

android.database.sqlite.SQLiteException: No such table: Android tablet: while compiling : SELECT * FROM AndroidTable

I know that I am loading the correct file (which is in this table), such as I change the directory path or database name, it is a run time Will fire the error.

Can anyone help?

Thanks

If you want to use a database built outside of your application , Follow the tutorial


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -