Wrox Programmer Forums
|
Visual Studio 2005 For discussing Visual Studio 2005. Please post code questions about a specific language (C#, VB, ASP.NET, etc) in the correct language forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual Studio 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 7th, 2006, 08:00 AM
Registered User
 
Join Date: Apr 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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.Get ResolvedMethodData(Type type, String methodName, IDictionary allParameters, DataSourceOperation operation) +1129
   System.Web.UI.WebControls.ObjectDataSourceView.Exe cuteUpdate(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(Gr idViewRow row, Int32 rowIndex, Boolean causesValidation) +1218
   System.Web.UI.WebControls.GridView.HandleEvent(Eve ntArgs e, Boolean causesValidation, String validationGroup) +853
   System.Web.UI.WebControls.GridView.OnBubbleEvent(O bject source, EventArgs e) +87
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35
   System.Web.UI.WebControls.GridViewRow.OnBubbleEven t(Object source, EventArgs e) +117
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35
   System.Web.UI.WebControls.LinkButton.OnCommand(Com mandEventArgs e) +86
   System.Web.UI.WebControls.LinkButton.RaisePostBack Event(String eventArgument) +153
   System.Web.UI.WebControls.LinkButton.System.Web.UI .IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler sourceControl, String eventArgument) +11
   System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +172
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4921




 
Old April 7th, 2006, 06:24 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

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
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
 
Old April 12th, 2006, 07:50 AM
Registered User
 
Join Date: Apr 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.

 
Old April 12th, 2006, 03:59 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

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

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
 
Old April 12th, 2006, 05:52 PM
Registered User
 
Join Date: Apr 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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

Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.
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.Data.ConstraintException: Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.



 
Old April 13th, 2006, 08:54 AM
Registered User
 
Join Date: Apr 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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

 
Old April 13th, 2006, 10:48 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

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





Similar Threads
Thread Thread Starter Forum Replies Last Post
Atlas Problem aliirfan84 ASP.NET 2.0 Professional 3 May 24th, 2007 07:37 AM
Does asp.net atlas should be installed in web serv arulkumar ASP.NET 2.0 Basics 1 February 12th, 2007 08:45 AM
Atlas login scheme mega ASP.NET 2.0 Professional 0 September 29th, 2006 12:19 AM
Video: Add some Atlas to your ASP.NET 2.0 jminatel ASP.NET 2.0 Professional 0 June 22nd, 2006 04:02 PM
asp / atlas cbailey77 SQL Language 5 April 19th, 2006 01:52 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.