Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Object reference not set to an instance of an object
Message
De
24/02/2006 11:39:55
Jason Mesches
Ocean Systems Engineering Corporation
Carlsbad, Californie, États-Unis
 
 
À
23/02/2006 21:28:56
Rex Mahel
Realm Software, Llc
Ohio, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
01098757
Message ID:
01098938
Vues:
15
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!!!
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform