For Answers, see/post comments

asp.net - atlas

hi,
im trying to create a simple database with Atlas, everything seems ok, I enabled page editing so user(s) can edit on the fly but when you click edit, on the chosen field, and then click update it comes back with an error that I will paste below. There are four colums

[Complaint Details] [Name] [Complete] [Date (dd/mm/yyyy)].

I would really appreciate some help, thanks so much..

Server Error in '/final' Application.

--------------------------------------------------------------------------------ObjectDataSource 'ObjectDataSource1' could not find a non-generic method 'Update' that has parameters: Complaint_Details, Name, Complete, p1, original_TaskId, Complaint Details, Date (dd/mm/yyyy).

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.InvalidOperationException: ObjectDataSource 'ObjectDataSource1' could not find a non-generic method 'Update' that has parameters: Complaint_Details, Name, Complete, p1, original_TaskId, Complaint Details, Date (dd/mm/yyyy).

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:

[InvalidOperationException: ObjectDataSource 'ObjectDataSource1' could not find a non-generic method 'Update' that has parameters: Complaint_Details, Name, Complete, p1, original_TaskId, Complaint Details, Date (dd/mm/yyyy).]

System.Web.UI.WebControls.ObjectDataSourceView.GetResolvedMethodData(Type type, String methodName, IDictionary allParameters, DataSourceOperation operation) +1129

System.Web.UI.WebControls.ObjectDataSourceView.ExecuteUpdate(IDictionary keys, IDictionary values, IDictionary oldValues) +2254

System.Web.UI.DataSourceView.Update(IDictionary keys, IDictionary values, IDictionary oldValues, DataSourceViewOperationCallback callback) +78

System.Web.UI.WebControls.GridView.HandleUpdate(GridViewRow row, Int32 rowIndex, Boolean causesValidation) +1218

System.Web.UI.WebControls.GridView.HandleEvent(EventArgs e, Boolean causesValidation, String validationGroup) +853

System.Web.UI.WebControls.GridView.OnBubbleEvent(Object source, EventArgs e) +87

System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35

System.Web.UI.WebControls.GridViewRow.OnBubbleEvent(Object source, EventArgs e) +117
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35
System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +86
System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +153
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) +172

System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4921

8 comments:

Anonymous said...

Hi there,

Does your ObjectDataSource have a property called OldValuesParamaterFormatString with a value of "original_"" If so, set it to "" or remove it altogether.

If that doesn't help, can you post the code for the control and the signatures of the method you're trying to call??

HtH,

Imar

Anonymous said...

Hi there,
I have the original problem solved...now I have, what I hope is simple problem to remedy.

I have a field in my page called 'Complaints' where the data type is 'nvarchar(50)' . I want to be able to have this field able to contain a paragraph of two, Is this possible? I know when it exceeds 50 characters and I try to update the "Complaints" UI on the website (I have it editable) It will crash, so I guess my question is how do increase the characters allowable on this field?

Thanks in advance for your help.

Anonymous said...

Can't you just change the size of the column in the database to, say, nvarchar(100) ??

Anonymous said...

Hi there,
I have the original problem solved...now I have, what I hope is simple problem to remedy.

I have a field in my page called 'Complaints' where the data type is 'nvarchar(50)' . I want to be able to have this field able to contain a paragraph of two, Is this possible? I know when it exceeds 50 characters and I try to update the "Complaints" UI on the website (I have it editable) It will crash, so I guess my question is how do increase the characters allowable on this field?

Thanks in advance for your help.

Anonymous said...

Can't you just change the size of the column in the database to, say, nvarchar(100) ??

Anonymous said...

I tried that but it comes back with
Server Error in '/AtlasWebSite1' Application.

Anonymous said...

Oh, by the way, what I'm trying to do is have one field called Complaints, which is able to have a paragraph or two. I made each column editable to a few users, depending on login credentials so they can udate on the fly. Its almost as I want it but I am little wet behind the ears with this so any help would be appreciated
Thanks

Anonymous said...

The error message seems to suggest that you try to insert a record with data that has no matching relation in another table.

So, let's say you insert a book. A book has an AuthorID. You get the error message you posted when you try to insert a book with an AuthorId that doesn't exist in the Author table, hence the "foreign key" problem.

Another reason you may get this error is that you try to insert a NULL value for a required column.

You may want to consult a more specific forum here at p2p.wrox.com, like one of the SQL forums, or another more specific ASP.NET forum and repost your question there.

If you do that, please provide more information, like your database structure, code and so on.

Imar