PC Review Forums Newsgroups Microsoft DotNet Microsoft Dot NET Compact Framework Re: DiffGram

Reply

Re: DiffGram

 
Thread Tools Rate Thread
Old 08-07-2003, 10:37 PM   #1
Ilya Tumanov [MS]
Guest
 
Posts: n/a
Default Re: DiffGram


Denny,

Loading diffgrams into not empty DataSet is not supported on CF.
Should you have any data in the DataSet, you will get NotSupportedException.

If you need to append data, you will have to load diffgram into empty
DataSet (i.e. clone of the original) and merge records manually later.

Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>Content-Class: urn:content-classes:message
>From: "denny" <info@kronosnet.com>
>Sender: "denny" <info@kronosnet.com>
>References: <722301c3445f$be4487d0$a401280a@phx.gbl>

<eRALuOGRDHA.2408@TK2MSFTNGP10.phx.gbl>
<072901c34466$e1cdcde0$a101280a@phx.gbl>
<#JdDGzGRDHA.1560@TK2MSFTNGP12.phx.gbl>
>Subject: Re: DiffGram
>Date: Mon, 7 Jul 2003 03:09:49 -0700
>Lines: 59
>Message-ID: <07c701c3446f$e6846200$a101280a@phx.gbl>
>MIME-Version: 1.0
>Content-Type: text/plain;
> charset="iso-8859-1"
>Content-Transfer-Encoding: 7bit
>X-Newsreader: Microsoft CDO for Windows 2000
>Thread-Index: AcNEb+aBk5K5msWzSrKUlB7Qrov9Cg==
>X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
>Newsgroups: microsoft.public.dotnet.framework.compactframework
>Path: cpmsftngxa09.phx.gbl
>Xref: cpmsftngxa09.phx.gbl

microsoft.public.dotnet.framework.compactframework:10006
>NNTP-Posting-Host: TK2MSFTNGXA09 10.40.1.161
>X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
>
>Neil,
>I thinks I've founded the solution to my problem.
>Before the DataSet.ReadXml ,I've added follow row code:
>If myDt.rows.count > 0 Then mydt.rows.clear
>
>It seems work fine.
>Thank for your help.
>
>denny
>
>>-----Original Message-----
>>The code looks correct, I need to see the XML.
>>
>>--Neil
>>
>>
>>
>>"denny" <info@kronosnet.com> wrote in message
>>news:072901c34466$e1cdcde0$a101280a@phx.gbl...
>>> Dim ds as new DataSet
>>> Dim adpt As New SqlCeDataAdapter
>>> Dim cmdBuild As New SqlCeCommandBuilder(adpt)
>>> Dim myDt As New DataTable
>>> Dim XMLFile As XmlReader
>>>
>>> ds.Tables.Clear()
>>>
>>> XMLFile = New XmlTextReader(myfileXML)
>>>
>>> SQLCmd = New SqlCeCommand("Select * from Customers", CN)
>>> With adpt
>>> .SelectCommand = SQLCmd
>>> .Fill(myDt)
>>> .InsertCommand = cmdBuild.GetInsertCommand
>>> .DeleteCommand = cmdBuild.GetDeleteCommand
>>> .UpdateCommand = cmdBuild.GetUpdateCommand
>>> End with
>>> ds.Tables.Add(myDt)
>>> myDt.TableName = "Customers"
>>>
>>> 'Here I receive a NotSupportedException
>>> Try
>>> ds.ReadXml(XMLFile, XmlReadMode.DiffGram)
>>> Catch ex As Exception
>>> MsgBox(ex.Message, MsgBoxStyle.Critical)
>>> End Try
>>>
>>> If ds.Tables("Customers").Rows.Count > 0 Then
>>> adpt.Update(ds, "Customers")
>>> End If
>>>
>>>
>>> Am I wrong something?
>>> Thanks in advance.
>>> denny

>>
>>
>>.
>>

>


  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off