Hi,
You need to call DataAdapter.Update() to transmit the changes cached in
DataSet to the database.
Thanks,
Amy
--------------------
| From: "Pete Vickers [eMVP]" <pete at gui - innovations dot com>
| References: <
[email protected]>
| Subject: Re: Update Database Problem ??? Ergent
| Date: Wed, 10 Mar 2004 11:49:15 -0000
| Lines: 39
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <
[email protected]>
| Newsgroups: microsoft.public.dotnet.framework.compactframework
| NNTP-Posting-Host: cpc2-bolt4-3-0-cust92.mant.cable.ntl.com 81.110.31.92
| Path:
cpmsftngxa06.phx.gbl!TK2MSFTNGXS01.phx.gbl!TK2MSFTNGXA05.phx.gbl!TK2MSFTNGP0
8.phx.gbl!TK2MSFTNGP10.phx.gbl
| Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.compactframework:48167
| X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
|
| Hi,
| more details would help, and you may be better going to the Quickstart
| Tutorials at
http://samples.gotdotnet.com/quickstart/CompactFramework/
where
| there is vb.net and c# code for databases.
|
| But, update would be done similar to...
|
| Dim SqlCmd as SqlCeCommand
| Dim Sql as string
|
| Sql = "Update mytable set myvalue = 1 where myvalue = 0"
| SqlCmd = New SqlCeCommand(Sql, sqlCeConn)
| SqlCmd.CommandType = CommandType.Text
| Try
| SqlCmd.ExecuteNonQuery()
| Catch ex As SqlCeException
| DisplaySQLCEErrors(ex, Sql)
| End Try
| SqlCmd.Dispose()
| HTH
|
| Pete
|
| --
| Pete Vickers
| Microsoft Windows Embedded MVP
| HP Business Partner
|
http://www.gui-innovations.com
|
| | > I create a sql server ce table and manage to insert some value into the
| table create. But when I try to update it does not update the data source.
| >
| > I try to delete the row, but it does not work ????
| >
| > Can anyone help
|
|
|