Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Verification on cloning
Message
De
10/12/2014 12:18:52
 
 
À
10/12/2014 11:07:35
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:
01612108
Vues:
56
>>No idea - depends on the error
>
>Whereas I need to clone, I have all kind of errors depending on the data manipulation that is done in the cloned copy. I need to look at this back this afternoon. This is a result of the dataset not being cloned entirely, or as per dependencies of other non shallowed copied items from the Data class.


There's another way - not that I'm sure it will solve the errors - you'll have to test it
			DataSet ds1 = ds.DataSet;   // the original

			DataSet ds2 = ds1.Clone(); // cloned

			using (MemoryStream contents = new MemoryStream())
			{
				ds1.WriteXml(contents);  // save contents to a stream
				contents.Position = 0;
				ds2.ReadXml(contents);
			}
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform