Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error when cancel new row
Message
From
28/11/2008 08:19:25
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
 
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Environment versions
Environment:
C# 2.0
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01364081
Message ID:
01364481
Views:
16
Hi Linda,

>I have a system for which the user selects a patient from one form before proceeding to a form that allows maintenance of patient data. If it is a new patient, I pass a zero as the patientid and create the new row using the form's NewRow() method in the constructor of the patient maintenance form. If I cancel using mmButtonCancel, I get an error from mmBusinessForm.GetCurrentRow() because it gets a null value when checking for the row count. I tried calling oPatient.GetEmptyDataSet() before calling the NewRow() method but that didn't help. Any suggestions?

Does your code work calling the forms NewRow() method if you do not cancel? I am wondering if your new row is actually created or not. The form.NewRow() ultimately calls the business Objects NewRow method. You could put a check in first to verify if your new row is created or not.
Tim
Timothy Bryan
Previous
Reply
Map
View

Click here to load this message in the networking platform