Take a look at ImportDataSet sample at
http://www.alexfeinman.com/samples.asp
In it the dataset is loaded from disk (xml file) and is written via update
into SQL CE table. To use it with your web service make the web service to
return the DataSet variable and use this return value instead of loading
Dataset from disk.
"Aaron" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi all,
> I am trying to insert a whole dataset from my web service into a
> SQLCE database. I am unsucessful so far. Any help is appreciated.
> Here is what I have so far (the dataset is returned fine). I think my
> problem lies in the fact that the rowstate is unchanged. I need it to
> be add or even better yet, can it compare on its own??
>
> Thanks, Aaron
> --------------------------------------------------------------------------
---
>
> Public Sub SynchSQL2(ByVal ds As DataSet)
> 'connect locally to SQLCE
> sqlConn = New SqlCeConnection(frmMain.connStr)
> sqlConn.Open()
> Dim dtSQL As DataTable
> Dim dtCE As DataTable
> Dim ds2 As DataSet = New DataSet
> Dim cb As SqlCeCommandBuilder
> Try
>
> Dim dsupdate As New DataSet
> 'this is one table I am trying to "synch"
> sqlDA = New SqlCeDataAdapter("select id,branch from
> branch", sqlConn)
>
> 'create the commands
> cb = New SqlCeCommandBuilder(sqlDA)
> 'set dataadapter insert to created command
> sqlDA.InsertCommand = cb.GetInsertCommand()
>
> sqlDA.Update(ds, "branch")
>
> Catch ex As Exception
> MsgBox(ex.Message)
> End Try