----------------------------------------------------------- New Message on BDOTNET
----------------------------------------------------------- From: Ravi_Kumar_Bits Message 1 in Discussion Hi friends, Here is the small program that gives me zero as the table count if i load this diffgram string into the dataset that has 1 table and 2 rows can any body please solve this and let me know Public Class DatasetTest Private Shared strCnx As String = "user id=136580;password=136580;initial catalog=Northwind;data source=tcs038285\netsdk" Private Shared Function getData() As DataSet Dim objDs As New DataSet() Dim strSql As String = "SELECT TOP 2 EMPLOYEEID,LASTNAME,FIRSTNAME FROM EMPLOYEES" Dim objDataAdapter As New SqlDataAdapter(strSql, strCnx) objDataAdapter.Fill(objDs) objDs.AcceptChanges() Return objDs End Function Public Shared Sub main() Dim objDs As DataSet Dim objStringBuilder As StringBuilder Dim strDs As String objDs = getData() objStringBuilder = New StringBuilder() objDs.WriteXml(New StringWriter(objStringBuilder), XmlWriteMode.DiffGram) strDs = objStringBuilder.ToString Dim objDs1 As New DataSet() objDs1.ReadXml(New StringReader(strDs), XmlReadMode.DiffGram) Console.WriteLine(objDs1.Tables.Count) End Sub End Class ----------------------------------------------------------- To stop getting this e-mail, or change how often it arrives, go to your E-mail Settings. http://groups.msn.com/bdotnet/_emailsettings.msnw Need help? If you've forgotten your password, please go to Passport Member Services. http://groups.msn.com/_passportredir.msnw?ppmprop=help For other questions or feedback, go to our Contact Us page. http://groups.msn.com/contact If you do not want to receive future e-mail from this MSN group, or if you received this message by mistake, please click the "Remove" link below. On the pre-addressed e-mail message that opens, simply click "Send". Your e-mail address will be deleted from this group's mailing list. mailto:[EMAIL PROTECTED]
