- Local time
- Today, 16:48
- Joined
- Feb 19, 2002
- Messages
- 45,026
YES when the db engine is performing the same validation.Allowing and even ignoring errors is an expression of efficiency?
We are talking here about forms not duplicating what the database engine is doing in ONE very specific case.But what about data integrity, like full imports?
You are taking something I said and extrapolating it to situations where I never suggested that errors be ignored. You are acting like I said to ALWAYS IGNORE ALL ERRORS and that is NOT what I said.How can you be sure that errors only occur for which the database machine's own error trapping is sufficient?
We are talking about importing a file in a situation where the import may contain duplicates. We are not talking about anything else. I don't know if we are having a language issue or not. But you are not understanding why I even suggested such heresy. That is what you might want to dwell on - the heterogeneous join. That is what makes the technique that eliminates the error up front so expensive. And that leads us to my suggestion to simply ignore this particular error rather than run the query with the heterogeneous join. Then I explained a very specific case where I don't ignore this particular error and why. So at no time did I ever say ------ ALWAYS IGNORE ALL ERRORS. That you are making up in your own mind and putting words in my mouth. My point is that I/O is the most expensive operation your code performs. Therefore, you should always avoid unnecessary I/O. What constitutes necessary I/O is the question here and my position is that when the database engine is going to save you from yourself, you don't ALWAYS need to validate ahead of time to simply prevent the user from getting a message. You should use your common sense and eschew performing I/O in cases where it is especially expensive - which it is in this specific case because the I/O involves a heterogeneous join. Clearly if we're talking about 12 records here nobody cares.
Jet/ACE allows the append to succeed after ignoring the errors. SQL Server does not. That may be what is confusing you. If you are using Access methods or DAO, you can just ignore the errors and life is good. The records that fail validation are NOT appended. The rest are.
We never got to the point of discussing how to identify which rows failed the import but I can explain that also if we can ever get past this one.