Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Verification on cloning
Message
De
14/01/2015 10:28:41
 
 
À
10/12/2014 12:18:52
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:
01613607
Vues:
51
When going manually, this works:
    ' Clone this object
    Public Function CloneManually() As Data
        Dim loData As Data = Nothing
        Dim loDataSet As DataSet = Nothing

        ' Get the proper definition as per the current scope
        If oProcess Is Nothing Then
            loData = New Data(oApp)
        Else
            loData = New Data(oProcess)
        End If

        loData.oDataSet = oDataSet.Copy
        loData.nCount = loData.oDataSet.Tables("Temp").Rows.Count
        loData.oDataView = New DataView

        ' If we have no record
        If nCount = 0 Then
            loData.oRows = Nothing
        Else
            loData.oDataView = loData.oDataSet.Tables("Temp").DefaultView
            loData.oRows = loData.oDataSet.Tables("Temp").Rows()
        End If

        Return loData
    End Function
There seems to be something when going through the MemberwiseClone() that puts something in memory which would make it not workable in my case.

When you mentioned the copy approach, is this pretty much what you had in mind?
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
Répondre
Fil
Voir

Click here to load this message in the networking platform