473,385 Members | 1,492 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.

Databinding problems with ObjectDataSource

I am working on a small project in which I am trying to implement a
data access layer through the use of a project dataset schema. Data
integrity and normalization will be handled through the use of SQL
Server stored procedures. Basically, for each data entity, I've written
_Get(), _Delete(), _Add() and _Update() stored procedures. The _Get()
procs return all data needed to display the information in a meaningful
manner to the user (description values are pulled in for foreign keys,
first/last names are concatenated, etc.). My _Add() and _Update() procs
just take the parameters necessary to create new and update existing
rows respectively, and the _Delete() proc just takes a key value for
performing the delete operation.

For my _Update() proc, I also included the @Original_ counterparts for
each parameter so that concurrency can be checked using ASP.Net's
CompareAllValues functionality. Furthermore, all procs are designed to
receive the @Original_ version of the key value where a key is needed.
This was actually done merely to try and remain consistent with the
auto-generated code and in the interest of avoiding any pitfalls
involved in handling any differences that might arise.

What is happening now is that when I drag a gridview control onto a new
webform, configure a new objectdatasource to use my custom procedures
and run the webform, everything displays wonderfully. However, when I
click the Edit linkbutton and make a change, upon clicking Update, I am
presented with an error to the effect of, "ObjectDataSource
'ObjectDataSource1' could not find a non-generic method Proc_Update()
that has parameters: .....". I checked the parameter list it mentions
and everything looks ok, except there is a parameter at the end that
isn't involved with my _Update() proc at all. It is, in fact, one of
the description values pulled in for a foreign key column in the _Get()
proc. I can't seem to figure out why it is being included in the
_Update() call, as it is not listed in the Update Parameters section of
the data source definition. I'm at my wits' end with this one. I have
tried creating a brand new webform with the same results. I've even
deleted the table adapter from my project's dataset and completely
recreating it with no luck.

On a somewhat related note, when I was configuring my table adapter
within the dataset designer, I specified my own stored procedures to
use for Get, Insert, Update and Delete actions, and for each one
(except for Get, of course) I specified that they would execute a
stored procedure and not return a value, which, strangely enough, looks
like that means it will return an integer reflecting the number of rows
affected. I tried setting them up to return a value, planning to
implement some error handling, but it looked like it was set to return
an object when I did so. Either way, I'm not sure which is the best way
to go with that setting, whether to support error handling or merely to
even get it working on a more basic level.

Any help with this would be *greatly* appreciated.

Rich

Jul 18 '06 #1
0 1144

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

Similar topics

3
by: John Bailey | last post by:
When I first built a few web pages in ASP .Net 2.0, I thought it was great. The formview and detailview contorls would automatically layout the controls for you, the update methods were...
2
by: ulrich schumacher | last post by:
Hi ASP.NET 2.0 Professionals, I've got a question concerning the new ASP.NET 2.0 DataBinding with object oriented business classes: Example: There are two business classes in my domain...
1
by: thzero | last post by:
Is there any way to do this without using the ObjectDataSource? (Apologies for the long post) I have a simple data object: public class TestDO { public TestDO() {} public ID { get; set; }...
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...
0
by: Simon Gregory | last post by:
I am currently attempting to figure out how the new databinding stucture works in ASP.NET 2.0 after working with v1.0 & v1.1 for several years. It seems that if you wish to do set up databinding...
8
by: GaryDean | last post by:
We have been noticing that questions on vs.2005/2.0 don't appear to get much in answers so I'm reposting some questions posted by some of the programmers here in our organization that never got...
8
by: Joey Chömpff | last post by:
L.S., Hello is there a way to implement 2-way databinding without using the datasources from dotnet 2.0. Why would you ask? Now that's simple. I've created an object model with BusinessObjects...
0
by: Wayne Sepega | last post by:
I have the following Object DataSource <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetCustomer" TypeName="Customers" DataObjectTypeName="Customer"...
0
by: Kevin | last post by:
Hi my name is Kevin I am currently working on a Asp 2.0 project and im having some ObjectDataSource Problems The thing is i have a Class called User and a Bussiness Logic Layer FcUser with...
5
by: cmrchs | last post by:
Hi, I'm trying out Databinding to a Data Acces Layer using a ObjectDataSource-control The Update works fine but the Delete-method doesn't. when debugging I see that my productID-parameter is...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.