I have a problem with a datatableadapter in a c# form using Visual Studio 2013.
All of my datatableadapter are working perfectly except one.
In the Query Builder when I construct the SQL query and testing the result, the data appear correctly. I am getting rows.
In the same datatableadapter, in the preview window, I am writing both parameters and it return zero row. When executing the code, it return zero row.
This is a query on a view.
SELECT CustID, OfficeRelationID, OfficeID, PostalBox, Facility, FloorCode, RoomNumber
WHERE (CustID = @CustID) AND (Facility = @Facility)
// Set the Office Room Number
DataSet1TableAdapters.viewOfficesTableAdapter daOffice = new DataSet1TableAdapters.viewOfficesTableAdapter();
DataSet1.viewOfficesDataTable dtOffice = daOffice.GetData(profiles.CustID, profiles.PrimaryFacility);
if (dtOffice.Rows.Count > 0)
if (dtOffice.RoomNumber.Length > 0)
I am using the same method with many other tableadapter and they all working perfectly.
Thanks for any help