iosdevnyc
iosdevnyc

Reputation: 1871

Sqlite on IOS dataconnection

He Guys,

Should I open the data connection to Sqlite every time I make a query? or is it possible to open the sqlite connection when the app opens and the connection stays open until the app exists?

Is this even a solution?

Upvotes: 0

Views: 150

Answers (1)

bbum
bbum

Reputation: 162712

You shouldn't really be using SQLite directly at all. At least use FMDB. Given your apparent new-ness to development, I would recommend Core Data as it is extremely well supported in the OS and will lead to the fewest lines of code (when used correctly).

To answer your concrete question; no, generally, you do not open / close a connection with every single query.

Upvotes: 2

Related Questions