errm, read SQL manual may be? fix should be like:
*xecSQL("DELETE FROM tablename where colname='"+string+"'",null);*

On Mon, Feb 14, 2011 at 4:59 PM, Abhilash baddam <
[email protected]> wrote:

> Hi,
>
>      what type of mistake is i am doing?
>
>
> On Mon, Feb 14, 2011 at 8:11 PM, Abhilash baddam <
> [email protected]> wrote:
>
>> Hi,
>>
>> In my code i used the command like this,*    *
>> *
>> *
>> * myDB.execSQL("DELETE FROM tablename where colname="+string,null);*
>>
>>   In the place of args i am passing null, is it correct what exactly i
>> have to pass there.
>>
>>
>> On Mon, Feb 14, 2011 at 8:06 PM, Abhilash baddam <
>> [email protected]> wrote:
>>
>>> Hi,
>>>
>>>      i am getting that string, dynamically.
>>>
>>>
>>> On Mon, Feb 14, 2011 at 7:54 PM, Mark Murphy <[email protected]>wrote:
>>>
>>>> Use adb logcat, DDMS, or the DDMS perspective in Eclipse to examine
>>>> LogCat and look at your stack trace associated with your error.
>>>>
>>>> In your case, you will find that you have invalid SQL, because your
>>>> string is not quoted. Please use:
>>>>
>>>> String[] args={string};
>>>> myDB.execSQL("DELETE FROM tablename where colname=?", args);
>>>>
>>>> On Mon, Feb 14, 2011 at 9:15 AM, Abhilash baddam
>>>> <[email protected]> wrote:
>>>> > Hi,
>>>> >     In sqlite database, i am having some values. How can i delete a
>>>> > particular value from database. I tried like but showing error..
>>>> > What mistake is i am doin here..?
>>>> > myDB.execSQL("DELETE FROM tablename where colname="+string);
>>>> > i want to delete the value at that particulat string.
>>>> > Any help regarding this issue?
>>>> >
>>>> > --
>>>> > You received this message because you are subscribed to the Google
>>>> > Groups "Android Developers" group.
>>>> > To post to this group, send email to
>>>> [email protected]
>>>> > To unsubscribe from this group, send email to
>>>> > [email protected]
>>>> > For more options, visit this group at
>>>> > http://groups.google.com/group/android-developers?hl=en
>>>>
>>>>
>>>>
>>>> --
>>>> Mark Murphy (a Commons Guy)
>>>> http://commonsware.com | http://github.com/commonsguy
>>>> http://commonsware.com/blog | http://twitter.com/commonsguy
>>>>
>>>> Warescription: Three Android Books, Plus Updates, One Low Price!
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Android Developers" group.
>>>> To post to this group, send email to
>>>> [email protected]
>>>> To unsubscribe from this group, send email to
>>>> [email protected]
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/android-developers?hl=en
>>>>
>>>
>>>
>>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Bambr in da house

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to