Quantcast
Channel: Appcelerator Developer Center Q&A Tag Feed (android)
Viewing all articles
Browse latest Browse all 7655

No such table sqlite (yes it is...)

$
0
0

Hi.

I have a db with a table named "kunder"

Everything works great i can write to it and i can read from it.

But i cant delete it....

This is what i have on my delete function

alertDialog.addEventListener('click',function(e){
    if (e.index == 0) {
        Ti.API.info(parseInt(Ti.App.projectNumber,10));
               var db = Ti.Database.open('MyDB');
               db.execute('DELETE FROM Kunder WHERE proj_nr = '+parseInt(Ti.App.projectNumber,10));
               db.close();
                  totalHrs.setValue('');
        tableview.setData([]);
 
 
       alertDialog.hide();
       }else{
 
        alertDialog.hide(); 
    }
});
The Ti.App.projectNumber is where i store my separate projects in. So i can get values from each project. It works when i write and when i read so why do i get "No such table: Kunder" when i want to delete it?

I am so confused here...


Viewing all articles
Browse latest Browse all 7655

Trending Articles