Exception error message is incomplete
Posted: Wed 07 Nov 2007 21:52
Using SDAC 4.10.xx
The message in an Exception is incomplete. For example, if I execute this, where second INSERT will be a duplicate record :
INSERT INTO MyTable (KeyField, OtherField) values ('xxx', 'test1')
INSERT INTO MyTable (KeyField, OtherField) values ('xxx', 'test2')
I get this error in the exception message :
The statement has been terminated.
When the full and complete message is :
Violation of PRIMARY KEY constraint 'PK_MyTable'. Cannot insert duplicate key in object 'dbo.MyTable'.
The statement has been terminated.
This renders the messages virtually useless !
How can I get the correct ( and complete ) message in the exception message ?
Regards,
Lluis Ollé
The message in an Exception is incomplete. For example, if I execute this, where second INSERT will be a duplicate record :
INSERT INTO MyTable (KeyField, OtherField) values ('xxx', 'test1')
INSERT INTO MyTable (KeyField, OtherField) values ('xxx', 'test2')
I get this error in the exception message :
The statement has been terminated.
When the full and complete message is :
Violation of PRIMARY KEY constraint 'PK_MyTable'. Cannot insert duplicate key in object 'dbo.MyTable'.
The statement has been terminated.
This renders the messages virtually useless !
How can I get the correct ( and complete ) message in the exception message ?
Regards,
Lluis Ollé