G
Guest
I'm getting the following error when I try and insert a row using FormView,
ObjectDataSource and stored procedure. The form has 40+ columns on it and I'm
not sure how to diagnose where the problem is, the data object class, the
business class etc?
Object of type 'System.Int32' cannot be converted to type 'System.String'.
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: Object of type 'System.Int32'
cannot be converted to type 'System.String'.
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: Object of type 'System.Int32' cannot be converted to
type 'System.String'.]
System.ComponentModel.ReflectPropertyDescriptor.SetValue(Object
component, Object value) +357
System.Web.UI.WebControls.ObjectDataSourceView.BuildDataObject(Type
dataObjectType, IDictionary inputParameters) +237
System.Web.UI.WebControls.ObjectDataSourceView.ExecuteInsert(IDictionary
values) +270
System.Web.UI.DataSourceView.Insert(IDictionary values,
DataSourceViewOperationCallback callback) +72
System.Web.UI.WebControls.FormView.HandleInsert(String commandArg,
Boolean causesValidation) +388
System.Web.UI.WebControls.FormView.HandleEvent(EventArgs e, Boolean
causesValidation, String validationGroup) +623
System.Web.UI.WebControls.FormView.OnBubbleEvent(Object source, EventArgs
e) +95
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35
System.Web.UI.WebControls.FormViewRow.OnBubbleEvent(Object source,
EventArgs e) +109
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35
System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +115
System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String
eventArgument) +163
System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +174
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102
Anu suggestions on how to diagnose this would be appreciated.
Thanks much.
ObjectDataSource and stored procedure. The form has 40+ columns on it and I'm
not sure how to diagnose where the problem is, the data object class, the
business class etc?
Object of type 'System.Int32' cannot be converted to type 'System.String'.
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: Object of type 'System.Int32'
cannot be converted to type 'System.String'.
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: Object of type 'System.Int32' cannot be converted to
type 'System.String'.]
System.ComponentModel.ReflectPropertyDescriptor.SetValue(Object
component, Object value) +357
System.Web.UI.WebControls.ObjectDataSourceView.BuildDataObject(Type
dataObjectType, IDictionary inputParameters) +237
System.Web.UI.WebControls.ObjectDataSourceView.ExecuteInsert(IDictionary
values) +270
System.Web.UI.DataSourceView.Insert(IDictionary values,
DataSourceViewOperationCallback callback) +72
System.Web.UI.WebControls.FormView.HandleInsert(String commandArg,
Boolean causesValidation) +388
System.Web.UI.WebControls.FormView.HandleEvent(EventArgs e, Boolean
causesValidation, String validationGroup) +623
System.Web.UI.WebControls.FormView.OnBubbleEvent(Object source, EventArgs
e) +95
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35
System.Web.UI.WebControls.FormViewRow.OnBubbleEvent(Object source,
EventArgs e) +109
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35
System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +115
System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String
eventArgument) +163
System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +174
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102
Anu suggestions on how to diagnose this would be appreciated.
Thanks much.