本文整理汇总了VB.NET中System.Data.Common.DataAdapter.Update方法的典型用法代码示例。如果您正苦于以下问题:VB.NET DataAdapter.Update方法的具体用法?VB.NET DataAdapter.Update怎么用?VB.NET DataAdapter.Update使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。
在下文中一共展示了DataAdapter.Update方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: CreateCommandAndUpdate
Public Function CreateCommandAndUpdate( _
ByVal connectionString As String, _
ByVal queryString As String) As DataSet
Dim dataSet As New DataSet()
Using connection As New OleDbConnection(connectionString)
connection.Open()
Dim adapter As New OleDbDataAdapter()
adapter.SelectCommand = New OleDbCommand( _
queryString, connection)
Dim builder As OleDbCommandBuilder = _
New OleDbCommandBuilder(adapter)
adapter.Fill(dataSet)
' Code to modify the data in the DataSet here.
' Without the OleDbCommandBuilder this line would fail.
builder.GetUpdateCommand()
adapter.Update(dataSet)
End Using
Return dataSet
End Function