home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.databases.ms-sqlserver      Notorious Rube Goldberg contraption      19,505 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 18,633 of 19,505   
   Gene Wirchenko to esquel@sommarskog.se   
   Re: Enforcing an Order to Validation   
   11 May 12 22:10:57   
   
   From: genew@ocis.net   
      
   On Fri, 11 May 2012 22:29:39 +0200, Erland Sommarskog   
    wrote:   
      
   >Gene Wirchenko (genew@ocis.net) writes:   
   >>      I do not see why, at least, for my use.  Suppose a Postal Code is   
   >> invalid.  That column's constraint fails.  If I send back tothe   
   >> front-end that Postal Code has an error, I simply issue an error   
   >> message that the Postal Code is invalid.   
   >>   
   >>      What difficulty are you thinking of?   
   >   
   >If you rely on the CHECK constraint, you will at some point you will have to   
   >parse the error message that SQL Server produces when the constraint is   
   >violated. That is doable, but I am not sure that I recommend it. It does   
   >happen that Microsoft change error messages between releases, which could   
   >break your code.   
      
        Ah.  I was hoping that there was a function that would return the   
   name of the constraint that failed.   
      
   Sincerely,   
      
   Gene Wirchenko   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca