constraint message box

J

Jim

Hi,

I have a dataset containing constraints. (not null, and size
constraints on table columns).
When the constraint is violated, a message box appears showing the
constraint violation.

Is there any way to catch these constraint violations WITHOUT doing one
of the following:

1) disabling the constraints and manually checking - because what is
the point of that? If I wanted manual checks I wouldn't bother with
fillschema or specifying the constraints at all.

2) installing a thread exception handler and parsing the exception
message, because different database languages and collation orders will
break it, not to mention foreign windows versions (A requirement in our
case).

Is there any way of handling these constraints, I am even happy to
inherit and override the dataset.
What method in the dataset actually pops up this rediculous message
without providing a developer hook to customise or handle the error?

Surely the clever boys at Microsoft did not just write code to pop up a
message without thinking that we might have other plans for the error
message.

Regards
Craig
 
P

Patrice

Are you sure this is not something you unintentionaly caught ? This is not
he behavior I experience. Constraints violation are reported here by
throwing an exception not by displaying a message box.

Patrice
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top