M
M
Macovod2014-01-22 23:01:56
SQLite
Macovod, 2014-01-22 23:01:56

Error with data replacement ( REPLACE) in SQLite

Task: it is necessary to populate the SQLite database through the fmdb framework in xcode. If data is available, then simply replace them.
Error in this place. The data is not replaced, but simply added to the database, i.e. are duplicated. Where is the mistake?
[database executeUpdate:@"REPLACE INTO list (free, image,title,id,author) VALUES (:free, :img, :title, :id, :author_title)" withParameterDictionary:theCourse];

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
SabMakc, 2014-01-23
@Macovod

What fields determine the uniqueness of data?
Most likely there is no unique-index on key fields.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question