Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error saving VFP data
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
00901822
Message ID:
00902453
Vues:
11
Thierry,

>#1 In a row I have a field with the value "Hiver 2005", I can edit this and update it to "Hiver 2007" no problem. If I edit it to a new value with more characters such as "Hiver 20057" then it fails:
>
>-----------------------------------------------------------------------------
>Cannot set column 'ses_cname' to 'Hiver 20057 '. The value violates the MaxLength limit of this column.
>Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
>
>Exception Details: System.ArgumentException: Cannot set column 'ses_cname' to 'Hiver 20057 '. The value violates the MaxLength limit of this column.
>
>Source Error:
>
>
>Line 87: DataSet dsSessions = (DataSet)Session["dsSessions"];
>Line 88: // Save the DataSet (the DataGrid automatically binds back)
>Line 89: this.SesBizObj.SaveDataSet(dsSessions);
>Line 90: // Reset the edited item and rebind the DataGrid
>Line 91: this.grdSessions.EditItemIndex = -1;

Hmmm...if the stack trace is correct, then the error is occurring when you pull the DataSet out of the session variable and store it into dsSessions. Can you set a breakpoint to verify this is correct?

>#2 How should we manage failed triggers: I try to delete a record, the trigger fails (normal) but it throws an exception. Should I use a try/catch block? Should not this be already taken care of by the business object?

In this case, your business object can check that all ranges are set properly (included maximum length).

>#3 Is there an error management feature as in the VFP framework where the errors are logged etc...

There is...errors are logged by the MM .NET Application Log class

>#4 I could not find any documentation on the methods of the business object, only on the properties. Is there some more doc with the full version?

Yes...in the latest version of MM .NET all methods of all classes are in the documentation.

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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform