I know that SQL Server 2000 has constraint which Database
designer can put restriction to a certain field. In MS
Acess, there are validation rules (compare to MSSQL server
is Constratint) and Validation text ( non of MS SQL Server
2000 exists this properties.
If I have table TTABLE and field name Credit which is
integer type. CK_01 is a constraint that was defined as
([Credit]) > 5
if user try to input value 1 in field Credit, in MS Access
Validation text is shown in dialog box. This is a very
usefull properties that DB Designer can put an instruction
for user to correct the problems such as " Credit must be
greater than 5 ". And also such property provide a meaning
full for programmer because they do not have to deal with
DBDesigner. When thy write a program that catch error, all
they have to do is to display error message which is
provided to programm exactly the way DB Designer want to.
For now, I don't know where to find such property in MS
SQL server 2000. When constraint violated by user, SQL
Server show message like
"UPDATE statement conflicted with COLUMN CHECK
constraint 'cst_01 Credit must be greater than 10'. The
conflict occurred in database 'TestDB', table 'TUSER',
The statement has been terminated. "
Which user doesn't know how to fixed it.
Tell me how to find Validation text. Or if MsSql server
cannot do as Ms Access do, just tell me how to force SQL
server to display just constraint name so I can put
description in it's constraint name. (just for temporary
untill MS SQL Server can do the same task)