>
>>dsDept.DepartmentDataTable dt = new dsDept.DepartmentDataTable(ds.Tables[0]);
>>>
>>>You are creating a "new" table outside of your dataset, so your dataset will be empty if you fill that table. (The table will have data, but you are returning the dataset, not the table.)
>>>
>>>dsDept.DepartmentDataTable dt = ds.DepartmentDataTable;
>>>
>>>or
>>>
>>>adapter.FillByID(ds.DepartmentDataTable, id);
>>>
>>>HTH
>>
>>Neither of those is acceptable to the system. When I build I get an error that dsDept.DepartmentDataTable is a 'type' and is not valid in the context.>
>Are you sure you went:
>
dsDept.DepartmentDataTable dt = ds.DepartmentDataTable;
>
>Or did you go:
>
dsDept.DepartmentDataTable dt = dsDept.DepartmentDataTable;
To be prefectly honest, I don't recall which I did. I think I typed it as you had it, but I really wouldn't want to swear to that on my mother's life.
>
>Based on your comment you went dsDept.DepartmentDataTable which is a type, ds.DepartmentDataTable is a reference to the table.
>
Now that I think on it, you're probably right.
>
However... everything works as it should, so thanks for the help in putting me on the right track. I was going crazy with this one.>
>You're welcome, glad you solved it.
Thanks to your help.