mister.magoo (9/3/2013)
Surely this is a case for validation at the front end?There always used to be a rule that applications validate input...
Yes and no. First of all, it depends on the kind of application. It may be an ETL application, and in that case you don't validate in the client, because all you have is files. (And I more or less assume that this is ETL.)
But even if the data comes from user entry, the business rules may be too complicate to warrant to duplication of them in the front-end. Things like mandatory fields, foreign keys etc are simple to enforce, but you may have more complex dependencies.
[font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]
Are you able to put a try catch block around your SP and use SCOPE_IDENTITY()
In your stored proc, why not simply check for rows which will cause an error (datalength > 2, in this case) , select them and return a message to the client?
Viewing 10 posts - 1 through 9 (of 9 total)
You must be logged in to reply to this topic. Login to reply