Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Save is not saving...
Message
De
30/03/2004 01:55:18
 
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
00890567
Message ID:
00890671
Vues:
19
>>When I try to save changes from a detail screen, everything SEEMS to go fine, but when I reload the page, my changes are gone.
>>
>>Here's the code that should do it -- what might I be missing here?
>>
>>
>>DataSet dsPermit = (DataSet)Session["dsPermit"];
>>
>>   if (this.Save(this.oPermit, dsPermit, this.oPermit.TableName) != mmSaveDataResult.RulesPassed)	
>>   {
>>	Response.Write("<script language=JavaScript>Alert('Changes could not be saved'))</script>");
>>	
>>   }
>>
>
>When you execute the call to this.Save() shown above, the business object raises a "Saving" event, to which all user interface controls which are bound to the business object respond (by storing their values to the business object's data). Is it possible that you are not registering the business object with the form in the Load handler of the page? (Make sure it's happening when IsPostBack is true). If this is the case, user interface controls never register with business objects on postback and the values never get written back to the business object.

I decided to use SaveDataSet instead, and things work fine (with SQL server, not VFP data...) All's well that ends well...
Pertti Karjalainen
Product Manager
Northern Lights Software
Fairfax, CA USA
www.northernlightssoftware.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform