Closed Spokane-Dude closed 10 years ago
Left an answer on SO: http://stackoverflow.com/a/25948551/1281846
@Alydyn's answer on StackOverflow is correct. You're only creating one entity, and then looping over and changing its attributes. I'll let the conversation continue on SO where @Alydyn can collect some points for a good answer :smile:
Thanks @tonyarnold :smile:
I have created a TAB-delimited file that I am using for backup purposes; the code below is used to restore the file. There are 5 records on the file; the first reccord contains the tab headings, the remainder the data.
When doing the restore, only the first record is restored, the other 3 are marked as unsuccessful. Here is the restore code:
This is the output from the console:
2014-09-18 14:54:43.502 BookI[32513:60b] --> Added - SKU: 1 2014-09-18 14:54:43.502 Book[32513:60b] --> Unsuccessful - SKU: 2 2014-09-18 14:54:43.502 Book[32513:60b] --> Unsuccessful - SKU: 3 2014-09-18 14:54:43.502 Book[32513:60b] --> Unsuccessful - SKU: 4
What am I doing wrong? Sorry for the double post (here and SO) but I'm in a quandry on this one... Thanks...