Quantcast
Channel: VBForums - Mobile Development
Viewing all articles
Browse latest Browse all 78

Populating ListView from SQCe

$
0
0
Im using this code to populate my datagrid from my SQLCe database, is it possible to use mydataset to populate a listview control?

Code:

Public Sub showdatabase()
        cmd = New SqlCeCommand("Select * from Table001", con)
        If con.State = ConnectionState.Closed Then con.Open()
        myda = New SqlCeDataAdapter(cmd)
        mydataset = New DataSet()
        myda.Fill(mydataset, "Table")
        DataGrid1.DataSource = mydataset.Tables("Table").DefaultView

        TextBox2.Text = mydataset.Tables("Table").Rows.Count
        cmd.Dispose()
        con.Close()
    End Sub

if its not possible, can someone show me on how to populate a listview with SQLCe database? Thanks!

Viewing all articles
Browse latest Browse all 78

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>