On 20 juin 2011, at 08:42, CodeBoy DVM wrote: > NSEnumerator *enumerator = [ward objectEnumerator]; > id element; > > while(element = [enumerator nextObject]) > {
You might want to modernize that code a bit (though this is likely not your problem here): for (NSDictionary *element in ward) { } Also try to avoid "id" as a type for variables you work with as "id" will prevent the compiler from doing any static type checking. Better to use the real class name, with perhaps one type cast. > sqlite> select * from members where db_id =1127; > 1127|2202|?????? ||||||||?????D??||||||0| > sqlite> select * from members where db_id =1177; > 1177|2015|????h?? ||||||||?f??????||||||0| > Select * is not very informative, though we can try to guess. Please select only the mentioned columns. Also I would inspect your database with a GUI tool (eg MesaSQLite) to double check those columns. > I have installed NSLog statements to try to hunt down the problem (those > NSLogs are in the method shown above), and every time I execute the code, the > NSLog seems to show the correct information, compared to the CSV: I would put a breakpoint in the code just before your bind statement, to check the data you are going to send them is indeed what you expect. > > 2011-06-19 22:50:24.534 iClerk[4292:a0f] Processing Person Moody, Isaiah > Terrell with Birth:1991-09-28 and ID: 2202 > 2011-06-19 22:50:24.534 iClerk[4292:a0f] Trying to bind > > 2011-06-19 22:50:24.591 iClerk[4292:a0f] Processing Person White, Lonnie Jay > with Birth:1973-12-12 and ID: 2015 > 2011-06-19 22:50:24.591 iClerk[4292:a0f] Trying to bind Perhaps set the values to bind in their own variables, and NSLog those variables right there. I would even log them *after* the call to sqlite3_step, just to make sure it's not a weird memory allocation issue. > > This particular update contains an array of 105 NSDictionaries to be added, > and every time, it is only these two that create problems. Everyone else's > data writes perfectly to the table, and I can SELECT them all I want, no > hiccups. > > I should also mention that there were originally about 5 or 6 other persons > creating difficulty, but when I narrowed down the desired data to just Full > Name and Birthdate, it is only these two. (The original routine collects > about a dozen pieces of information for each person, but my list only needs > name and birthdate, so I tried to just make it work by only dealing with > those.) But did you find out *why* those 5 or 6 persons had problems? If not, by discarding those 5 or 6 persons, you also discarded information that may have lead to the reason for the problem. I am sorry I don't have a better suggestion, I'm pretty much a SQLite newbie too. Jean-Denis _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users