473,385 Members | 1,764 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Same Old ObjectDataSource Problem

I created an asp.net website which works fine. I then tried to
recreate it as a series of Web Application Projects, one project for
the data layer, one for the business layer and one for the
presentation layer. They are all properly referenced up the line.
Data manipulation is via stored procedures in a SQL Server 2005
database. For the data layer, I created a dataset file with
dataadapter to the data, which works fine. The business layer
consists of a class that invokes the data layer via public functions;
GetData, AddData, UpdateData, DeleteData. My first webform is a
simple one on which I have an ObjectDataSource and Gridview to display
a simple table of text messages from users. The gridview has edit,
delete and sorting enabled. The webform loads fine, with data
displayed in the gridview. Deleting and sorting work fine. However,
when updating, I get the time-honored error: 'ObjectDataSource1' could
not find a non-generic method... I got this error when building the
website, but resolved it by naming the parameters exactly as the
database field names. However it didn't fix it this time. What
baffles me is that the select and delete methods are found in the
business layer, but the update and insert methods are not found. I
checked the method names and they are exactly the same as called and
the parameter names are exactly as specified in the functions. I've
read all the posts on this subject and manipulated the
OldvaluesParameterFormatString accordingly to no avail. I tried
creating a local procedure to update for the gridview OnUpdating
event. That works, but then the ObjectDataSource still invokes its
update method after my procedure and gives the error. If I eliminate
the update method from the ObjectDataSource, I get an error about
that.

I would sure appreciate some tips on how to resolve this. Thanks.

Steve T.
Jan 8 '08 #1
0 1077

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Trail Monster | last post by:
Ok, I've been searching the net now for several days and can't find how to do this anywhere. Version: VS 2005 Professional Release, 2.0 Framework Background: I have a complex business object...
3
by: mthomason | last post by:
I keep getting this error when trying to update records using an ObjectDataSource. I have seen others post similar errors...but I haven't found any solutions. ObjectDataSource...
0
by: Eiriken | last post by:
Hello everyone, I am using ASP.NET 2 and trying to bind a objectdatasource to a gridview. By doing this the most common way by adding an objectdatasource to the page and by using the wizard to...
7
by: Dabbler | last post by:
I'm using an ObjectDataSource with a stored procedure and am getting the following error when trying to update (ExecuteNonQuery): System.Data.SqlClient.SqlException: Procedure or Function...
2
by: J055 | last post by:
Hi I've implemented caching for my ObjectDataSource. <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" EnableCaching="True" CacheDuration="10" CacheExpirationPolicy="Sliding" ...
14
by: Rolf Welskes | last post by:
Hello, I have an ObjectDataSource which has as business-object a simple array of strings. No problem. I have an own (custom) control to which I give the DataSourceId and in the custom-control...
0
by: Sean | last post by:
I have a page that has a formview and two repeaters that use separate objectdatasources. Each objectdatasource returns records that contain a field named DateAndTime. The problem I'm having is...
9
by: Kernel Bling | last post by:
Hi Everyone, This Saturday the stage was set. The problem simply could not go on existing -- it had to be solved. Many hours, articles, compilations and frustrations later I still did not find...
3
by: btreddy | last post by:
Hii all, I've a problem regarding passing select parameters to objectdatasource from code behind. i would like to pass the select parameters to a objectdatasource ..not in the selecting or...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.