Orders.cs using System; using System.Data; using OakLeaf.MM.Main.Business; namespace Acme.OrderSystem.Business { /// <summary> /// Summary description for Orders. /// </summary> public class Orders : ABusinessObject { public Orders() { this.TableName = "Orders"; this.PrimaryKey = "OrderID"; } public DataSet GetOrdersByCustomerID(string customerID) { return this.GetDataSet("Select * from Orders where CustomerID = '" + customerID + "'"); } public DataSet GetOrderByOrderID(int orderID) { // Broke into two statements for debugging string Sql = "Select * from Orders where OrderID = '" + orderID + "'"; // From Watch statement: "Select * from Orders where OrderID = '10282'" // ****** Death by StackOverflowException on following statement. return this.GetDataSet(Sql); // Original statement from jump start instructions //return this.GetDataSet("Select * from Orders where OrderID = '" + orderID + "'"); } } }I checked the datatype for Northwind's Orders.OrderID and changed the sql statement to:
string Sql = "Select * from Orders where OrderID = " + orderID.ToString();but got the same error.