asp.net : use dataadapter with dataset..

use dataadapter with dataset..


Using connection As New SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings("vinConn").ConnectionString)

            Try
                connection.Open()
                Dim sqlComm As SqlCommand
                Dim sqlReader As SqlDataReader
                Dim dt As New DataTable()
                Dim dataTableRowCount As Integer
                sqlComm.Connection = connection
                Dim da As SqlDataAdapter = New SqlDataAdapter(connection)
                Dim ds As DataSet
                da.Fill(ds, "table1")
                Repeater1.datasource = ds.Tables("table1")
                Repeater1.databind()
            Catch e As Exception
                connection.Close()
                Return e.Message
            Finally
                connection.Close()
            End Try

Comments