I created the following Sub to fill a DataSet with the Table named Developer. It binds to the Grid with no problems.
Public Sub SearchSkills()
Dim sqlcmd3 As SqlCommand = New SqlCommand
sqlcmd3.CommandText = "SELECT DeveloperId, SkillsID, Name, SkillLevel, MonthsExperience, Skills FROM vDeveloperSkills"
sqlcmd3.Connection = connection
Dim da As New SqlDataAdapter(sqlcmd3)
Dim scb As New SqlCommandBuilder(da)
Dim ds As New DataSet
da.Fill(ds, "developer")
Me.GridView1.DataSource = ds.Tables("developer")
Me.GridView1.DataBind()
SearchOne()
End Sub
I then want to filter the Table("developer") using the following code. However, the Table("developer") does not have any columns. I checked the column count using Dim z As Integer = dt.Columns.Count.
Dim DataRow2 As DataRow()
Dim dt As DataTable = New DataTable("developer")
DataRow2 = dt.Select("SkillsId = '1'", "SkillsId DESC")
For Each row As DataRow In DataRow2
ListBox1.Items.Add(row("SkillsId "))
Next
Thanks,
Wbosw