Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Column
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Titre:
Re: Column
Divers
Thread ID:
00792382
Message ID:
00793250
Vues:
29
>>The field it's complaining about is calculated from a UDF call on the SQL server side. This seemed to work OK until I upgraded to the latest beta (but I have also made some other changes, so it's probably something I have done and not MM). The code to generate the DataSet is found in a parent class of the business object. I don't think that should be a problem.
>>
>>I'm not trying to update any data in the DataTable or the DataSet.

>Are you keeping your DataSet around and reusing it?

I think so <g>. I'm saving off the data set to the Session[] object and naming it based on the bizobj that generated it (prefix with 'ds'). So, for example: if I have a RMKMain bizobj, then the data set generated by that is called dsRMKMain. It is saved in the Session["dsRMKMain"].

The problem occurs when I want to repopulate the data set from the business object because the user has moved to a new record. In a hook method in my business object, I declare a local DataSet variable, build the string containing the SQL statement (or SP call), and call .GetDataSet(string, IDbDataParameter[]). As soon as I call that method, I get the error "Column 'cCustomerName' is read only.". This is the exact same code I'm running the first time I populate the business object.

(Basically, it's the same kind of code you have in your GetOrdersByCustomerID()example in the MM documentation). The actual call to this.GetDataSet() happens in the base class but the SQL string is constructed in the derived class.

It's really weird....Do I have release the bizobj DataSet before re-populating it or something -- like in the Retrieving (or is it OnRetrieving()) EventHandler.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform