Sqlite Delete doesn't delete

by Wall-E » Fri, 13 Aug 2010 23:16:00 GMT

Sponsored Links
 I have written a database adapter to implement database functions like
query(), delete(), update(), insert()....etc.  So I have been able to
insert and query just fine but deleting a specific row is not working
at all.  I have tested deleting all the rows and that works fine even
though the return value is still 0 or false.  I have posted my
delete() method and my table:

Again, I have confirmed insert and query but not delete and after
sending this post I'm going to try the update to see if that works.
Also, the open() call just does the DBHelper.getWritableDatabase().
I'm concerned that it is the way my table is set up but I've tried all
the sql statements in a sqlite browser and that table is just fine.

                                        "[PHONENUMBER_ID] NVARCHAR(15) PRIMARY 
                                        "[PHONENUMBER] NVARCHAR(15) NOT NULL);" 

public boolean deletePhoneNumber(String phonenumber)

        int rowsDeleted = db.delete(ECHOLIST_TABLE, PHONENUMBER_ID +
                        "=" + phonenumber, null);

        //int rowsDeleted = db.delete(ECHOLIST_TABLE, null, null);


                return (rowsDeleted > 0);


Sqlite Delete doesn't delete

by Chris Stewart » Fri, 13 Aug 2010 23:20:03 GMT

 I use db.execSQL to delete.

Chris Stewart

Football< http://chriswstewart.com/android-applications/fantasy-football/> ;-
Android app for fantasy football fanatics and MFL owners
Social Updater< http://chriswstewart.com/android-applications/social-updater/> ;-
An easy way to send your status blast to multiple social networks


Sponsored Links

Sqlite Delete doesn't delete

by Farjad Habib » Fri, 13 Aug 2010 23:20:32 GMT

 give the phonenumber in single quotes....like below

PHONENUMBER_ID + "='" + phonenumber +"'"


Sqlite Delete doesn't delete

by RichardC » Fri, 13 Aug 2010 23:22:44 GMT

 Try putting quotes around the phonenumber string


Sqlite Delete doesn't delete

by Wall-E » Sat, 14 Aug 2010 00:08:23 GMT

 Thanks everybody, yea the problem is that the WHERE clause was using
my string value without the quotes.


Other Threads

1. Reading pictures written by camera to SDCARD

I want to access camera pictures and camera pictures only. I could not
find a specification of how the default camera application stores

1)  Is /sdcard/DCIM a standard of any kind? On the Android devices
I've used, it looks like the default camera app always writes to this
location. Are there devices where pictures are written to a different
2) Is it specified that camera JPEGs will always be accessible on the
file system? (And not in some private database for example?)

I'm hoping that if the above two are true, then I can simplify my code
by simply reading the jpeg's in /sdcard/dcim.

Or do I have to use MediaStore.Images.Media.query() for reliable
access to camera images?


2. Online Multiplayer Game for Android

Hello everyone,

I am getting started in android development and I really want to
create some form of online game.  My goal is to start out with a turn-
based game and move onto advanced multiplayer games.  I want to have
users associated with their google account, provide some sort of
matchmaking to pair people together, have their stats stored in a
database, and use the stats for various leaderboards and such.  I have
read over an older discussion on this list at
.  There was a lot of good information that I gathered but I still
have some questions.  What I have so far is an apache web server on a
laptop that I don't need right now (2.0Ghz Core 2, 3GB Ram).

I have never really used Java (although I'm learning it for android),
but I know C/C++, Perl, and Python.  I am in the process of learning
mysql databases, which will help with a lot of the stats features I
want to implement.  I have built a HTTP/1.1 persistent server in C
before which did JSON parsing and used a threadpool so I am somewhat
familiar with the low-level network calls needed.  However, I'm
thinking that a free server software must exist that would offer more
security and better load-balancing than the server I created.  One
solution I am thinking is to just use the Apache web server, have
android make a request to a perl module I create on the server, and
then have the server look it up on a database and so forth.  Then the
server will just keep sending back the player locations or whatever.
Will the Apache web server slow me down for what I am trying to do or
I am looking at everything the wrong way?  Are there some settings in
Apache that I could tweak to give me better latency such as persistent

I assume I will be using android.net for a lot of the client side.
Are there some good client examples that anyone knows of?

I appreciate anyone that can give me advice or point me to more



3. Application for news reader

4. Stop Application Catch

5. app keeps halting in SQLiteCursor.class

6. first boot apk install

7. icalendar issue