I have a situation where I have a Dataset with a table adapter that queries a table using a parameter that is the tables primary key.
The returned data is always a single row.
I thought it would be more efficient to just fill a DataRow instead of a DataTable..perhaps I am wrong.
Normally when I fill a DataTable using a tableadapter I do something like this
ProductsTabelAdapter adapt = new ProductsTableAdapter();
ProductsDS.ProductsDataTable prodTB = new Products.ProductsTableAdapter();
prodTB = adapt.GetDataBy(prodid);
I thought that filling a DataRow would have been something similar
ProductsTableAdapter adapt = new ProductsTableAdapter();
ProductsDS.DataRow prodrow = new ProductsDS.DataRow();
prodrow = adapt.GetDataBy(prodid);
Apparently I am wrong.
This returns an error
Cannot implicitly convert type ProductsDS.ProductsDataTable to ProductsDS.ProductsRow
Anyone able to point me in the right direction