Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What's missing?
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Environment versions
Database:
MS SQL Server
Miscellaneous
Thread ID:
01162436
Message ID:
01162803
Views:
19
>I have this code in the click event of a button:
>
> int seriesNo = oGSN.iGenerateSeriesNo("CEK");
> oPsDatacenter.NewRow();
> oAppsysUsers.NewRow();
> oPsPersonaldata.NewRow();
> oPsDatacenter.Entity.dcno = seriesNo;
> oPsDatacenter.Entity.fullname = oPName.PersonFullName;
> oPsDatacenter.Entity.fullname = oPName.PersonFullName2;
> oPsDatacenter.Entity.customname = oPName.PersonCustomName;
> oAppsysUsers.Entity.userdcno = seriesNo;
> oPsPersonaldata.Entity.dcno = seriesNo;
> Save();
> Close();
>
>
>It seems that the memory variable values didn't save to its proper column/field because the error says that dcno is not allowed to be null. The error is pointing to the Save() method of the mmForm.

Again, this code should "just work". I see that two of your entity objects have a dcno property. Which object is it erroring out on? You are calling the form-level Save() method which by default saves to the primary business object. Do you have these other objects registered as children so their data is automatically saved too?

P.S. I see you are in the Phillipines. If you're reading this message soon after I post it send me an e-mail to let me know. I may be able to get on your computer with a GoToMeeting session (we don't need voice because we can use the chat window) and I can figure it out in just a few minutes.

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