Sign in to follow this  

Delete Query not working-SQLite

This topic is 2632 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi!
I'm using SQLite for my game. When a particular button is clicked,I've to get the selection of a list control and delete it from the list control and from the database. for this I'm using the following code and query.




if(m_pSelectProfileImage->getRelativePosition().isPointInside(m_MousePos))
{
stringw strtoDelete = profileList->getListItem(profileList->getSelected());
strtoDelete.make_lower();
strtoDelete.trim();
if(!strtoDelete.equals_ignore_case(L"default"))
{
irr::core::stringc testStr = "DELETE FROM profile WHERE name = '";
testStr += strtoDelete;
testStr += "'";
pManager->SQLdb.Query(testStr);
profileList->removeItem(item);
}



I execute the above line and open the database file using SQLite Database Browser to check whether the particular record has been deleted. It's not deleted. When I put a break point to verify the query, my list selection is there in the query(testStr). What might be the problem? How to delete a record?

Share this post


Link to post
Share on other sites
What part of that code is actually in the SQLite API? I don't recognise any of it. Surely there are methods that return success or failure when you use them, which you can call to see what has actually occurred.

Share this post


Link to post
Share on other sites

This topic is 2632 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this