Any way to find out which TField is raising EDBClient with the message "Required Field Value".?

I have one TClientDataSet with several fields, and I get this exception, I'm sure I forgot to set one field value, but the question is, which field?

Is there a way to quickly find out which field raises this exception?

EDIT

I solved the problem, I connected the TClientDataSet to the wrong provider, which had the required field on the server, but did not have this field on the client.

But this still does not cancel my question, I lost a lot of time to figure it out, and if I had some way to find out what area required by the server side raised this error, it would be very quick to understand what was mine mistake.

EDIT 2

Related QC:

# 5557 - Resolved as "How Designed."

# 54380 - Open

+3
source share
1 answer

When the debugger notifies you of an exception, look at the call stack. Go to the routine that iterates over the list of fields, and check the loop control variable at this point to see how far you have moved the list of fields in your program before throwing an exception.

If the loop control variable is not accurate, set a breakpoint in this procedure and restart the program. Go through until you get an exception.

Another option is to look at all the fields and make sure that it is missing a value.

+4

Source: https://habr.com/ru/post/1710707/


All Articles