Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combobox
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Miscellaneous
Thread ID:
01518054
Message ID:
01519851
Views:
50
Robert,

>Hi Kevin. I have multiple comboboxes that work fine. There's nothing going on with the relationship. When I delete the relationship a 0 is saved as the foreign key instead of the "Real" value of the foriegn key.
>
>When I step through the code I noticed that
>
>_TRRequestFK = 4
>TRRequestFK = 4
>As expected
>
>And
>
>_StatusTypeFK = 0
>StatusTypeFK = 3 (Example FK)
>
>Seems like it's trying to save the value of _StatusTypeFK to the database instead of the StatusTypeFK value.
>
>If I assign TRRequestFK = 4 before I save the business object it will save that value back to the database when I call the save.

Do you mean StatusTypeFK = 4? The underlying private variable is what *should* be stored. That's because the property retrieves the value from this private variable when you access the property. It's really a question of how/when that private variable is getting set to zero. I recommend checking your code to see if there are any references to _StatusTypeFK that might be setting the value to zero. Alternately, you can set a breakpoint on the private variable and set a condition so execution breaks when the value changes.

Best Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform