首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > VB Dotnet >

vb.net怎么从数据集保存到数据库

2012-02-17 
vb.net如何从数据集保存到数据库vb是用rs.fields()[解决办法]给个例子:VB.NET codePublic Function Create

vb.net如何从数据集保存到数据库
vb是用rs.fields()

[解决办法]
给个例子:

VB.NET code
Public Function CreateCmdsAndUpdate(ByVal dataSet As DataSet, _ByVal connectionString As String, ByVal queryString As String) As DataSet    Using connection As New OleDbConnection(connectionString)        Dim adapter As New OleDbDataAdapter()        adapter.SelectCommand = New OleDbCommand(queryString, connection)        Dim builder As OleDbCommandBuilder = New OleDbCommandBuilder(adapter)        connection.Open()        Dim customers As DataSet = New DataSet        adapter.Fill(customers)        ' Code to modify data in DataSet here         adapter.Update(customers)        Return customers    End UsingEnd Function
[解决办法]
探讨
能具体的来个例子么?谢谢大侠

热点排行