|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Create a new dataset from a dataviewHi,
I created a dataview for filtering data from a datatable, I want to create a new dataset from this dataview. Anybody can give a simple solution? Thanks in advance Hi,
The dataview has a totable method. This method is new to vb 2005. Imports System.Data.SqlClient Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim strConn As String = _ "Server = .\SQLEXPRESS;Database = NorthWind; Integrated Security = SSPI;" Dim conn As New SqlConnection(strConn) Dim da As New SqlDataAdapter("Select * from Products", conn) Dim dt As New DataTable da.Fill(dt) Dim dv As New DataView(dt) dv.RowFilter = "UnitPrice>20" Dim dt2 As DataTable = dv.ToTable DataGridView1.DataSource = dt2 End Sub Ken -------------- Show quoteHide quote "Li Pang" <LiP***@discussions.microsoft.com> wrote in message news:96F9B53E-EEF8-4A6B-BCE4-81E367B4DC65@microsoft.com... > Hi, > > I created a dataview for filtering data from a datatable, I want to create > a > new dataset from this dataview. Anybody can give a simple solution? > > Thanks in advance
Decimal/Single/...: which Numeric-type to use?
Sorting a System.Collections.ObjectModel.Collection Converting vb.net book examples Process.Start() throws an error saying "Setup error: failed to load resources from resource file Ple Creating a CSV from query results Sending emails to multiple recipients ot: mvps, how do you propse one? AddressOf from VB6 to .Net VB MouseUp event fires randomly on Listview new Interop.ADODB errors!!! Please help |
|||||||||||||||||||||||