RSmith wrote on Friday, January 16, 2015 1:08 PM
> 
> On 2015/01/16 18:33, Simon Slavin wrote:
> >
> > Error: mytextfile.txt line 13588392: expected 2 columns of data but
> > found 1
> >
> > Naturally I spent some time looking near the end of the file to
> figure out what was wrong where the actual error was in line 2, and
> should have read something like "still inside quote when file ends".
> 
> Firstly - thanks, this made me chuckle.  Secondly - I think the parser
> does not realize there is an error until it is at the end of the file
> nor counts any imports as successful or indeed imported at all, since
> that first line will very much not be imported after the transaction
> was rolled back (I hope), so to report the successful imports number is
> probably not feasible. Stating that the error was specifically due to
> this or that might also be a stretch if one examines the number of
> possible things that can go wrong.
> 
> I do however believe it would be easy to note the line at which the
> import failed as being the line where parsing started for the current
> record (i.e line 2 in Simon's case), but then it may well be the error
> actually occurs on line 13588392 (such as an invalid UNICODE character),
> reporting line 2 in this case will be diabolical.
> 
> Last I would offer an idea to simply specifically check for "Unclosed
> Quote" error. I mean I can't imagine another import like the one above
> existing in real life, but certainly an actual unclosed quote might be
> a common mistake in some new export system (which maybe one is
> designing for oneself or as an application extension) or such.
> 

Why not just report both where it started and where it was discovered?

Erik

----------------------------------------------------------------------
This message, and any attachments, is for the intended recipient(s) only, may 
contain information that is privileged, confidential and/or proprietary and 
subject to important terms and conditions available at 
http://www.bankofamerica.com/emaildisclaimer.   If you are not the intended 
recipient, please delete this message.
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to