473,396 Members | 1,995 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,396 software developers and data experts.

Error: The best overloaded method match for ...

In the aspx.cs file, i call userService.Insert(userEntity);
Codes:
UserService userService = new UserService();
User userEntity = new User();
setUserEntityForInsert(userEntity); //set values for the entity
bool a = userService.Insert(userEntity);

Insert methods:
public override bool Insert(User entity)
public virtual TList<User> Insert(TList<User> entityCollection)


I recived this error when i run the page:
The best overloaded method match for 'QuartzCashbook.Component.UserServiceBase.Insert(Q uartzCashbook.Entities.TList<QuartzCashbook.Entiti es.User>)' has some invalid arguments
Error in this line:
Line 34: bool a = userService.Insert(userEntity);
As u can see, i use the Insert(User entity) but the web said that the arg for the Insert(TList<User>....). What's happened ? I can't understand, someone help me, thank !
Oct 4 '07 #1
3 2463
r035198x
13,262 8TB
In the aspx.cs file, i call userService.Insert(userEntity);
Codes:
UserService userService = new UserService();
User userEntity = new User();
setUserEntityForInsert(userEntity); //set values for the entity
bool a = userService.Insert(userEntity);

Insert methods:
public override bool Insert(User entity)
public virtual TList<User> Insert(TList<User> entityCollection)


I recived this error when i run the page:
The best overloaded method match for 'QuartzCashbook.Component.UserServiceBase.Insert(Q uartzCashbook.Entities.TList<QuartzCashbook.Entiti es.User>)' has some invalid arguments
Error in this line:
Line 34: bool a = userService.Insert(userEntity);
As u can see, i use the Insert(User entity) but the web said that the arg for the Insert(TList<User>....). What's happened ? I can't understand, someone help me, thank !
The method is expecting a TList of User objects and you supplied a User object.
Oct 4 '07 #2
Thank, i tried to add userEntity to userList, and then call the method Insert(userList) and it's alright now.
Oct 8 '07 #3
r035198x
13,262 8TB
Thank, i tried to add userEntity to userList, and then call the method Insert(userList) and it's alright now.
Welcome.
The error messages are usually a complete give away.
Oct 8 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: AA | last post by:
I have this simple class public class Person { public Person(){} public String Name = String.Empty; public String LastName = String.Empty; } and this procedure that has one input parameter...
3
by: eddy de boer | last post by:
Dear reader, In my code I get the following error: AddComment.cs(32): The best overloaded method match for 'WebLogger.Message.SelectMessage(string, out string, out string)' has some invalid...
3
by: Ant | last post by:
Hello, I'm a total newbie to .NET & C# so... When I use Messagebox to show a string & test it, no problems. i then change the string to an integer, save, rebuild & test & it comes up with this...
1
by: Will Chamberlain | last post by:
I am currently converting some VB.NET web apps to C#. It has been pretty seamless so far but have currently run into some problems that I can't resolve. The line that generates the error is: The...
3
by: maya | last post by:
am following "asp.NET Unleashed", by Stephen Walther (a SAMS book.. covers .net 1.1 though..) on one of his examples (ch 2) am getting compilation error.. code: <script Runat="Server"> void...
0
by: tshad | last post by:
I am getting the following error which makes no sense. No accessible overloaded If you look at the error, there is one overloaded function that can be called (int, string, int, int). The...
1
by: prakash.mirji | last post by:
Hello, I am trying to compile C++ code which uses rogue wave 9.0 classes on RHEL 4.0. I use gnu g++ compiler to compile the code. Compiler is not able to match the right type of parameters to...
1
by: NvrBst | last post by:
I'm having a problem with a "Member not found. (Exception from HRESULT: 0x80020003 DISP_E_MEMBERNOTFOUND))" error. The origional ASP is JScript, and the ASP.NET is JScript.NET. I'm creating an...
3
by: =?Utf-8?B?Umljaw==?= | last post by:
Line #2 in the following code generates an error; what am I doing wrong? Error 1 The best overloaded method match for 'Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteDataset(string,...
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
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.