Hello Rex,
Looking at BindControlToData(DataSet ds, String tableName, String fieldName), I would suggest one of the following is happening when evaluating ds.Tables[tableName].Rows[0][fieldName]:
1. ds.Tables doesn't contain the table it's referencing
2. There are no rows in that datatable (so Rows[0] isn't an object.
3. The field referenced doesn't exist in that datatable.
If none of this rings a bell, put a breakpoint in that method and see which one is causing the error.
Hope that helps,
---J
>All,
>
>I have a simple entry form similar to the Order Edit form that gives the above message with the following trace:
>
>
>[NullReferenceException: Object reference not set to an instance of an object.]
> OakLeaf.MM.Main.Web.UI.WebControls.mmTextBox.BindControlToData(DataSet ds, String tableName, String fieldName) +655
> OakLeaf.MM.Main.Web.UI.mmWebBindingStrategySimple.BindData(ImmWebBindingSimple mmControl, mmBusinessObject bizObj, Boolean bindBack, mmBusinessStateChangeEventArgs e) +692
> OakLeaf.MM.Main.Web.UI.mmWebBindingStrategySimple.BindData(ImmWebBindingSimple mmControl, mmBaseBusinessObject bizObj, Boolean bindBack, mmBusinessStateChangeEventArgs e) +208
> OakLeaf.MM.Main.Web.UI.WebControls.mmTextBox.OnBindData(mmBaseBusinessObject bindingSource, mmBusinessStateChangeEventArgs e, Boolean bindBack) +189
> OakLeaf.MM.Main.Web.UI.mmBusinessWebPage.BindControl(ImmWebBinding control, String bindingSource, String bindingMember) +482
> OakLeaf.MM.Main.Web.UI.mmBusinessWebPage.RegisterBoundControl(ImmWebBinding boundControl) +448
> OakLeaf.MM.Main.Web.UI.mmBusinessWebPage.OnBubbleEvent(Object source, EventArgs e) +153
> System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +56
> OakLeaf.MM.Main.Web.UI.WebControls.mmTextBox.OnLoad(EventArgs e) +153
> System.Web.UI.Control.LoadRecursive() +74
> System.Web.UI.Control.LoadRecursive() +158
> System.Web.UI.Control.LoadRecursive() +158
> System.Web.UI.Control.LoadRecursive() +158
> System.Web.UI.Control.LoadRecursive() +158
> System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3036
>
>
>Help!!!