ArgumentOutOfRangeException

Posts   
 
    
yj
User
Posts: 39
Joined: 07-Aug-2007
# Posted on: 17-Aug-2007 10:27:18   

Hi guys, its me again. This time i am having some problems when i try to do some validation to the data that i want to persist. Based on what i understand, whenever an entity's value is changed, the following functions will be called: SetNewFieldValue(), then OnValidateFieldValue(), am i rite? However, my problem is, how do i actually utilize the returned value from these functions? I would like to do something at the application tier (GUI) like:

UserProfile.Name = txtName.Text;

the name attribute should be having string length btween 0-200.

But everytime when the above code is ran, it will pop me to the VS Studio development window with a pop up warning window saying "ArgumentOutOfRangeException was unhandled by user code"

I had tried using if statements when assigning, e.g.: if (UserProfile.Name = txtName.Text) to see if this can give me the status of the inserting, however to no avail.

Please can someone help me on this? Thank you so much.

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 17-Aug-2007 11:20:32   

Did you implement Field Validation for thsi field? If so, did your FieldValidation handler receive the call?

Which llblgenpro runtime library are you using? (ref:[http://www.llblgen.com/TinyForum/Messages.aspx?ThreadID=7725](http://www.llblgen.com/TinyForum/Messages.aspx?ThreadID=7725))

I had tried using if statements when assigning, e.g.: if (UserProfile.Name = txtName.Text) to see if this can give me the status of the inserting, however to no avail

I don't understand what the IF statement is for?