Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Verification on cloning
Message
De
09/12/2014 13:08:40
 
 
À
09/12/2014 12:22:20
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
VB 9.0
OS:
Windows 8.1
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01612064
Message ID:
01612072
Vues:
63
>If I understand you correctly,
>As per the doc, memberwiseClone only copies value types. As to objects (like dataset) it only copies the reference, meaning both references point to the same dataset
>
>Maybe you want DataSet.Copy() http://msdn.microsoft.com/en-us/library/system.data.dataset.copy(v=vs.110).aspx

Thanks, this works.

This is pretty much what I have to do:
            ' If the transmit does not work, we will have a message to show and a list to refresh
            ' As the data changes in the ExportToExcel(), we need to keep a copy
            loDataSet = oData.oDataSet.Copy

            ' Export to Excel
            If Not ExportToExcel() Then
                oProcess.AddJavascriptMessage(cMessage)
            End If

            ' Assign it back
            oData.oDataSet = loDataSet
It would be interesting to find a way to implement that directly in the Data class however. As you said, presently, this behavior copies the value types only. I wonder if there could be a way to add the support of this DataSet.Copy at that level instead of doing it in here, in a client class. By that, I would then be able to use only one command, thus the Clone call, such as mentioned in the first message.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform