lunes, 7 de diciembre de 2015

DataTable







        
 Data Source=.\SQLEXPRESS; Initial Catalog="TADM"; Integrated Security=SSPI;

 Dim dt As New DataTable
        Dim da As New Data.SqlClient.SqlDataAdapter

        Dim n As Integer = 0

        da.SelectCommand = New SqlClient.SqlCommand
        da.SelectCommand.Connection = New SqlClient.SqlConnection(My.Resources.conn)
        da.SelectCommand.CommandType = CommandType.StoredProcedure
        da.SelectCommand.CommandText = ("golf")
        da.Fill(dt)

        GridView1.DataSource = dt
        GridView1.DataBind()

No hay comentarios: