i've problem access other class in android...
i've class databasex (non static) and class CountingFragment (static)....
in CountingFragment i want to access databasex class..but i get result null....
here is my piece of code...
class Databasex
public class DataBasex {
public static final String KEY_ROWID="_id";
public static final String KEY_NAME="namaLokasi";
public static final
My application want to calculate the total sales in a month. I used sql statements sum. But when I run the application it fails. and I do not know why this error. expect people to help me fix this.
i am developing application using sqlite databse having one table name comment that stores id , name, number and block.
now i get an error every time when i run the application that
sqlite returned: error code = 1, msg = no such column: ph_number
the code is below..
public class MySQLiteHelper extends SQLiteOpenHelper {
public static final String TABLE_COMMENTS = "comments";
public s
I want to know one thing in android sqlite.
I created my database in sdcard.
I have created a class to manage a SQLite database.
I am trying to get db.update to update one of the rows of my database with new values but it does not seem to be saving. I have looked over my syntax but I cannot seem to get the data to save. The insert function is working but not update. Any help would be appreciated. Below is my data class which uses a DbHelper object.
Don't know what is the reason why i can't fetch the data i needed in my database
there isn't an error to my code but it doesn't work
here is my databasehelper
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
public class DatabaseHelper extends SQL
I'm trying to upgrade my database from version 1 to version 2.
In my android application, I use SQLite database. It works only for emulator. When I'm installing my apk file into device, It won't show any data. But in my emulator it works very well. I can't understand about this problem.
1) Do I copy anything to device to make it work?
2) Is the database I created common for all?