|
|
|
Forum Guru
      
Group: Forum Members
Last Login: 2009-06-27 19:05:52
Posts: 64,
Visits: 353
|
|
| Asp.Net content form with a DataGridView - ExternalID and an AutoInc I added are there. Let's me Edit a record but I get this when I hit the "Update" grid command column.. ran through QuickStart7(asp.net) and couldn't see any missed steps. I tried removing the class's associations, regernated model, vallidated model, regenerated db scema(SQLServer2005), rebuilt solution..err still there. Restarted VS2008 - err still there on update. Anyone else see this? Doesn't the EcoDataSource take care of the PK? [ArgumentException: There is no key field defined in the UI component] Eco.Web.UI.WebControls.EcoDataSourceView.GetObject(IDictionary keys) in e:\dev\fbuild\source\Eco\Eco.Web\EcoDataSourceView.cs:868 Eco.Web.UI.WebControls.EcoDataSourceView.ExecuteUpdate(IDictionary keys, IDictionary values, IDictionary oldValues) in e:\dev\fbuild\source\Eco\Eco.Web\EcoDataSourceView.cs:814 System.Web.UI.DataSourceView.Update(IDictionary keys, IDictionary values, IDictionary oldValues, DataSourceViewOperationCallback callback) +92 System.Web.UI.WebControls.GridView.HandleUpdate(GridViewRow row, Int32 rowIndex, Boolean causesValidation) +907 System.Web.UI.WebControls.GridView.HandleEvent(EventArgs e, Boolean causesValidation, String validationGroup) +704 System.Web.UI.WebControls.GridView.OnBubbleEvent(Object source, EventArgs e) +95 System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37 System.Web.UI.WebControls.GridViewRow.OnBubbleEvent(Object source, EventArgs e) +123 System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37 System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +118 System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +135 System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +175 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565
- Joe Hendricks SoftwareRunners | Life On Glen Cove
|
|
|
|
|
Forum Guru
      
Group: Forum Members
Last Login: 2009-06-27 19:05:52
Posts: 64,
Visits: 353
|
|
| Uninstalled latest field test, reinstalled EcoSetup_5.0.0.3854_2009-03-07_b690, restarted computer.. Started a new ECO5 asp.net/xml persistence app with Class1/Attribute1 and now get this WEIRD error: Server Error in '/' Application. -------------------------------------------------------------------------------- Key must consist of ExternalId only Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.ArgumentException: Key must consist of ExternalId only Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [ArgumentException: Key must consist of ExternalId only] Eco.Web.UI.WebControls.EcoDataSourceView.GetObject(IDictionary keys) in e:\dev\fbuild\source\Eco\Eco.Web\EcoDataSourceView.cs:869 Eco.Web.UI.WebControls.EcoDataSourceView.ExecuteUpdate(IDictionary keys, IDictionary values, IDictionary oldValues) in e:\dev\fbuild\source\Eco\Eco.Web\EcoDataSourceView.cs:814 System.Web.UI.DataSourceView.Update(IDictionary keys, IDictionary values, IDictionary oldValues, DataSourceViewOperationCallback callback) +92 System.Web.UI.WebControls.GridView.HandleUpdate(GridViewRow row, Int32 rowIndex, Boolean causesValidation) +907 System.Web.UI.WebControls.GridView.HandleEvent(EventArgs e, Boolean causesValidation, String validationGroup) +704 System.Web.UI.WebControls.GridView.OnBubbleEvent(Object source, EventArgs e) +95 System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37 System.Web.UI.WebControls.GridViewRow.OnBubbleEvent(Object source, EventArgs e) +123 System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37 System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +118 System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +135 System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +175 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565
- Joe Hendricks SoftwareRunners | Life On Glen Cove
|
|
|
|
|
Supreme Being
      
Group: Administrators
Last Login: 2 days ago @ 17:14:40
Posts: 1 195,
Visits: 1 323
|
|
Normally the EcoDataSource will be configured so that it adds a key column called "ExternalId", and when you connect a gridview or some other databound control to this datasource, it should set its DataKeyNames property to "ExternalId". If this property is changed to some other value, you will get an exception when you try to perform an update from the component since the Datasource can't tell which row you updated.
/Jonas Hogstrom [CapableObjects]
|
|
|
|
|
Forum Guru
      
Group: Forum Members
Last Login: 2009-06-27 19:05:52
Posts: 64,
Visits: 353
|
|
Jonas Hogstrom (2009-04-28) Normally the EcoDataSource will be configured so that it adds a key column called "ExternalId", and when you connect a gridview or some other databound control to this datasource, it should set its DataKeyNames property to "ExternalId". If this property is changed to some other value, you will get an exception when you try to perform an update from the component since the Datasource can't tell which row you updated.Nothing manually changed at all, ExternalID is there - the second time it happened I was using the default Class1/Attribute1 right after starting a new ECO5 solution w/xml persistence, generating model code, building solution, running xml autoforms. Edit works fine, but update does not.
- Joe Hendricks SoftwareRunners | Life On Glen Cove
|
|
|
|
|
Forum Guru
      
Group: Forum Members
Last Login: 2009-06-27 19:05:52
Posts: 64,
Visits: 353
|
|
| Uninstalled, reinstalled VS2008 w/all updates - reinstalled ECO5 - FIXED !! So, I guess my VS was the issue, sigh.
- Joe Hendricks SoftwareRunners | Life On Glen Cove
|
|
|
|