0

I'm having trouble executing an UPDATE-query with fmdb. It locks the application without any errors.

It stops at this line:

[db executeUpdate:@"UPDATE categories SET number_places = 21 WHERE id = 44"];
Stefan Edberg
  • 231
  • 2
  • 4
  • 15

2 Answers2

2

What are your other threads doing? If you're using fmdb across multiple threads, you should check out FMDatabaseQueue, and use that in place of using FMDatabase directly.

ccgus
  • 2,906
  • 23
  • 18
1

I ran into a similar situation and couldn't figure out why my application locked up.

Further investigation lead to the conclusion that I had left the FMDatabase connection open in a previous method call.

As soon as I closed the connection and executed a new query with a new connection everything worked fine.