Why doesn't SQL Server tell me which field is causing the error? -


this question has answer here:

when doing sql insert, may fail because 1 of fields fail validate. there variety of validations may fail. example have seen:

[22003] [microsoft][odbc sql server driver][sql server]arithmetic overflow error converting varchar data type numeric. (8115) 

and

[22001] [microsoft][odbc sql server driver][sql server]string or binary data truncated. (8152) 

it quite frustrating go hunting troublesome field when have many columns , inserting many rows @ time prepared statements. why can't sql server tell me field problematic? please note not looking on how solve these individual errors, rather more fundamental question why better error messages not implemented.

edit: why can't sql server tell me column causing error being marked duplicate off doesn't answer question. accepted answer there doesn't address question putting bounty on nothing.

well sql set based engine , logic of sets boolean. either data in set or isnt. yes / no. there lot of fancy techniques employed set client asap. guess if started checking individual values inside set, you'd shoot performance in head badly hand customers competing rdbms hand on fist. yes annoying when insert fails, dividing data in half find exception down quite quickly. can improve design approach prevent problem reoccuring. (less sloppy, more robust)

but you'd have ask somone on sql dev team definitive answer, guess give 3 reasons: performance, performance , of course scalable peformance. hth


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -