Using SQL CE, in "To add an additional query to the CustomersTableAdapter" the SQL uses "Top 5" but I get an error in the Query Configuration Wizard saying that SQL CE does not support "Top", so you probably need to delete the "Top 5". Also, some of the field names have a space character in them so you need to correct that too. The Query Builder is useful for correcting the field names.
There are numerous corrections to the code required due to the name changes, all consisting of adding a "_" in the names where the spaces are. You can use the compile errors to find the names that need to be changed.
You might also notice that the IsCustomer_IDNull() function is missing on OrdersRow. That can be solved by adding the missing code to the partial codebehind file for the DataSet. Open NorthwindDataSet.xsd and double-click on the background to create the codebehind. Replace with this:
namespace ObjectBindingWalkthrough {
public partial class NorthwindDataSet {
public partial class OrdersRow : global::System.Data.DataRow
{
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public bool IsCustomer_IDNull()
{
return this.IsNull(this.tableOrders.Customer_IDColumn);
}
}
}
}
Also, since SQL does not support "Top 5", the GetDataByCustomerID query in "Modifying the Query on the OrdersTableAdapter To Return Only Orders for the Desired Customer" is not needed; the default query is sufficient.
Finally, since all customers are being obtained instead of just the Top 5, the query might require a few additional seconds to execute.