Problem adding first record to table


Author
Message
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Well, you have a few details that are left out so let's fill in a few blanks.  A cast exception is going to occur anytime that you try to stuff a data type of one type into another without any type of conversion (i.e. attempt to place a string into an integer).  This can come from literally an unlimited number of things.  So if you could post the stack trace, that would be great.  Also, from just hearing what you are dealing with, have you mapped the BO through the BO Mapper and rebuilt the partial classes for your BOs?
Rylster
Rylster
StrataFrame Beginner (8 reputation)StrataFrame Beginner (8 reputation)StrataFrame Beginner (8 reputation)StrataFrame Beginner (8 reputation)StrataFrame Beginner (8 reputation)StrataFrame Beginner (8 reputation)StrataFrame Beginner (8 reputation)StrataFrame Beginner (8 reputation)StrataFrame Beginner (8 reputation)
Group: StrataFrame Users
Posts: 4, Visits: 30
Hi there, my first post.

I have this problem with all my window forms. When I try to add a record to table with no records I get

"InvalidCastException was unhandled by user code".

The field is a text field in which null is not allowed. There is a default value set.

If there are already 1 or more records in the table no error occurs.

I can see that the Add method of the BO is calling the Get method for the text field. Why does it do this on an Add action?

Thanks in advance for any help.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search