ASP/Database problem (Long)

Code:
 Dim codestatusAdapter As New ManHoursTableAdapters.CodeStatusTableAdapter()
        Dim codeStatus As ManHours.CodeStatusDataTable
        Dim codeStatusRow As DataRow
        Dim CodeID As Integer
        Dim TimeCodeStatusTextBox As New TextBox
        Dim TimeCodeDropDown As New DropDownList

        TimeCodeDropDown = CType(DetailsView1.FindControl("TimeCodeDropDown"), DropDownList)

        CodeID = Convert.ToInt32(TimeCodeDropDown.SelectedValue)


        TimeCodeStatusTextBox = CType(DetailsView1.FindControl("TimeCodeStatus"), TextBox)
        codeStatus = codestatusAdapter.GetCodeStatus(CodeID)

        codeStatusRow = codeStatus.Rows(0)
        [B]TimeCodeStatusTextBox.Text = codeStatusRow("CodeID").ToString[/B]

When I select a code from my DropDownMenu I get the following error on the line in bold:

Column 'CodeID' does not belong to the table CodeStatus
 
Ok the DataSet visualiser shown the field CodeStatus and a value of 'In Progress' was in there.

That's a pretty good sign I suppose! Not that i've got a clue why it isn't working :D
 
Back
Top Bottom