Click here to Skip to main content
12,449,919 members (46,334 online)
Rate this:
Please Sign up or sign in to vote.
See more: SQL SQL-Server
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at System.Data.Linq.SqlClient.SqlProvider.Execute(Expression query, QueryInfo queryInfo, IObjectReaderFactory factory, Object[] parentArgs, Object[] userArgs, ICompiledSubQuery[] subQueries, Object lastResult)
   at System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(Expression query, QueryInfo[] queryInfos, IObjectReaderFactory factory, Object[] userArguments, ICompiledSubQuery[] subQueries)
   at System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query)
   at System.Data.Linq.DataContext.ExecuteMethodCall(Object instance, MethodInfo methodInfo, Object[] parameters)
   at PatchSystem.PatchSyncDBDataContext.sp_Patch_InsertPatchDetails_New(String patch_id, Nullable`1 incident_id, String customer_id, String version_no, String requestedUserEmail, String emails, String status, String selectedProjects, String framework_version, String svn_link, Nullable`1 server_id) in E:\Build_Team\WindowsFormsClient_Checkout\UserInterface\Modules\Patch\PatchSyncDB.designer.cs:line 356
   at PatchSystem.Data.InsertPatchDetails(String patchID, Int32 incidentID, String customerId, String esVersion, String requestedUserEmail, String email, String status, String selectedProjects, String frameworkVersion, String svnlink, Int32 serverId) in E:\Build_Team\WindowsFormsClient_Checkout\UserInterface\Modules\Patch\Data.cs:line 333

i got the above error message. i dont know where i did mistake. can anyone help me out.

When the control comes here, i got the error.
public int sp_Patch_InsertPatchDetails_New([Parameter(Name = "Patch_id", DbType = "VarChar(25)")] string patch_id, [Parameter(Name = "Incident_id", DbType = "Int")] System.Nullable<int> incident_id, [Parameter(Name = "customer_id", DbType = "VarChar(25)")] string customer_id, [Parameter(Name = "Version_no", DbType = "VarChar(100)")] string version_no, [Parameter(Name = "RequestedUserEmail", DbType = "VarChar(100)")] string requestedUserEmail, [Parameter(Name = "Emails", DbType = "VarChar(100)")] string emails, [Parameter(Name = "Status", DbType = "VarChar(50)")] string status, [Parameter(Name = "SelectedProjects", DbType = "VarChar(MAX)")] string selectedProjects, [Parameter(Name = "framework_version", DbType = "VarChar(MAX)")] string framework_version, [Parameter(Name = "svn_link", DbType = "VarChar(MAX)")] string svn_link, [Parameter(Name = "Server_Id", DbType = "Int")] System.Nullable<int> server_id)
            IExecuteResult result = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())), patch_id, incident_id, customer_id, version_no, requestedUserEmail, emails, status, selectedProjects, framework_version, svn_link, server_id);
            return ((int)(result.ReturnValue));
Posted 21-Sep-12 1:32am
Updated 21-Sep-12 1:50am
VIPR@T 21-Sep-12 7:34am
With out showing your code how can we find? Please post your code here..
vadiveln 21-Sep-12 7:47am
i have the posted my code.
vadiveln 21-Sep-12 7:48am
i have posted my code here.
Wes Aday 21-Sep-12 7:36am
You are trying to call an SP or function with too many arguments....
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

This error is obvious, when you are trying to pass more parameter to a stored procedure then it expects.
Take a look at How to troubleshoot ‘Procedure or function has too many arguments specified’ [^] and resolve the error.

Rate this: bad
Please Sign up or sign in to vote.

Solution 2

before assigning parameters for SP write this line
check you have passed no. of parameters same as declared in store procedure
Haapy Coding!
Smile | :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.160826.1 | Last Updated 21 Sep 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100