TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
balla etoyo ignace yves
NA
26
0
Function overload trouble
Feb 28 2013 4:12 PM
Hello
I am having a little database of 2 tables (workshop and categories) that i have added to a project( which has 2 windows forms.The main form has a datagrid who will display the list of workshop at launching) and a button that will launch the second form (named DetailForm supposed to display all the details related to a workshop)
I have created a dataset including both tables. Inside the dataset i have added a new table adapter named Workshoplist and type the following TSQL code
SELECT Workshops.ID, Categories.Description AS Category, Workshops.Days, Workshops.Cost, Workshops.Description
FROM Categories INNER JOIN
Workshops ON Categories.ID = Workshops.CategoryID
The project has a middle tier class named Workshop in which i have typed the following code
Public Function Update(ByVal id As Short, ByVal categoryId As Short,
ByVal days As Short, ByVal cost As Decimal, ByVal description As String) As Boolean
---->Return adapter.Update(id, categoryId, days, cost, description) > 0
End Function
At the "Return line " i am having the following error message :
overload resolution failed because no accessible Update accepts this number of argument
Of course i went to check the dataset tableadapters :
1)workshopTableAdapter
SELECT ID, CategoryID, Days, Cost, Description
FROM Workshops
2)categoriestableadapter
Select Id,description from categories
3)tableadapter workshoplist getdata method
SELECT Workshops.ID, Categories.Description AS Category, Workshops.Days, Workshops.Cost, Workshops.Description
FROM Categories INNER JOIN
Workshops ON Categories.ID = Workshops.CategoryID
I dont know how to fix that trouble; any help will be appreciable
In advance thanks and regards
PS
All the 3 classes written in
VB
.NET are included in a text file .There are each 30 lines or less length
Reply
Answers (
0
)
c# coding
c# Projects