Click here to Skip to main content
15,906,645 members
Home / Discussions / Database
   

Database

 
QuestionMaking a Winform Application Support ORACLE and SQL Server Pin
Member 118746624-Sep-08 2:40
Member 118746624-Sep-08 2:40 
AnswerRe: Making a Winform Application Support ORACLE and SQL Server Pin
Coxianuk24-Sep-08 11:23
Coxianuk24-Sep-08 11:23 
AnswerRe: Making a Winform Application Support ORACLE and SQL Server Pin
jVersteegen24-Sep-08 23:49
jVersteegen24-Sep-08 23:49 
GeneralRe: Making a Winform Application Support ORACLE and SQL Server Pin
Member 118746625-Sep-08 5:08
Member 118746625-Sep-08 5:08 
QuestionAccessing/ connecting MySQL database from VC++ application...... please help Pin
param_joshi24-Sep-08 2:29
param_joshi24-Sep-08 2:29 
Questioninstance of sql server at client side Pin
laziale24-Sep-08 1:40
laziale24-Sep-08 1:40 
AnswerRe: instance of sql server at client side Pin
Rob Graham24-Sep-08 2:09
Rob Graham24-Sep-08 2:09 
QuestionHow can I solve this "Procedure or function StoredProcedure1 has too many arguments specified. problem"? Please only experts. Pin
JUNEYT24-Sep-08 0:20
JUNEYT24-Sep-08 0:20 
Hi,

I have been trying to get rid of the following error message since last 4 days and there is no progress yet. Here is the error message, code and related table structure. Please help me to solve the problem. I use SQL SERVER EXPRESS 2008 with Visual Studio 2008. The strored procedures are not functioning if they called from inside a web page Confused | :confused: but when I use ADO.NET to initiate a stored procedure, it is running. I perfomed extensive search in google but I couldn't find an accurate solution to problem.


ERROR MESSAGE
<br />
<br />
Server Error in '/' Application.<br />
--------------------------------------------------------------------------------<br />
<br />
Procedure or function StoredProcedure1 has too many arguments specified. <br />
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. <br />
<br />
Exception Details: System.Data.SqlClient.SqlException: Procedure or function StoredProcedure1 has too many arguments specified.<br />
<br />
Source Error: <br />
<br />
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  <br />
<br />
Stack Trace: <br />
<br />
<br />
[SqlException (0x80131904): Procedure or function StoredProcedure1 has too many arguments specified.]<br />
   System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +1948826<br />
   System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +4844747<br />
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +194<br />
   System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2392<br />
   System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +204<br />
   System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +954<br />
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +162<br />
   System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) +175<br />
   System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +137<br />
   System.Web.UI.WebControls.SqlDataSourceView.ExecuteDbCommand(DbCommand command, DataSourceOperation operation) +386<br />
   System.Web.UI.WebControls.SqlDataSourceView.ExecuteInsert(IDictionary values) +227<br />
   System.Web.UI.DataSourceView.Insert(IDictionary values, DataSourceViewOperationCallback callback) +86<br />
   System.Web.UI.WebControls.ListView.HandleInsert(ListViewItem item, Boolean causesValidation) +277<br />
   System.Web.UI.WebControls.ListView.HandleEvent(EventArgs e, Boolean causesValidation, String validationGroup) +652<br />
   System.Web.UI.WebControls.ListView.OnBubbleEvent(Object source, EventArgs e) +233<br />
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37<br />
   System.Web.UI.WebControls.ListViewItem.OnBubbleEvent(Object source, EventArgs e) +112<br />
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37<br />
   System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +118<br />
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +166<br />
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10<br />
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13<br />
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36<br />
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565<br />
<br />
 <br />
<br />
<br />
--------------------------------------------------------------------------------<br />
Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053 <br />


CODE IN WEB PAGE
<br />
        <asp:SqlDataSource ID="SqlDataSource1" runat="server"   ConnectionString="<%$ ConnectionStrings:HolidayDBConnectionString %>"        <br />
            InsertCommand='StoredProcedure1' <br />
            <br />
            <br />
            SelectCommand="SELECT DISTINCT [ActivityName] FROM [Activities] ORDER BY [ActivityName]" <br />
            InsertCommandType="StoredProcedure"><br />
            <InsertParameters><br />
                <asp:Parameter Name="GetActivityName"  Type="String" Size="50"/><br />
            </InsertParameters><br />
        </asp:SqlDataSource><br />
<br />



STORED PROCEDURE
<br />
ALTER PROCEDURE dbo.StoredProcedure1<br />
	<br />
	(<br />
	@GetActivityName nvarchar(50)<br />
	)<br />
	<br />
AS<br />
INSERT INTO [HolidayDB].[dbo].[Activities]<br />
           ([ActivityName])<br />
     VALUES<br />
           (@GetActivityName)<br />
<br />
	RETURN<br />
<br />


TABLE STRUCTURE
<br />
PK ActivityNumber Bigint (IDENTITY) ALLOW NULLS FALSE<br />
   ActivityName   nvarchar(50)  ALLOW NULLS FALSE<br />
   <br />
<br />



What a curious mind needs to discover knowledge is noting else than a pin-hole.


AnswerRe: How can I solve this "Procedure or function StoredProcedure1 has too many arguments specified. problem"? Please only experts. Pin
Rob Graham24-Sep-08 2:14
Rob Graham24-Sep-08 2:14 
GeneralRe: How can I solve this "Procedure or function StoredProcedure1 has too many arguments specified. problem"? Please only experts. Pin
JUNEYT24-Sep-08 11:15
JUNEYT24-Sep-08 11:15 
AnswerRe: How can I solve this "Procedure or function StoredProcedure1 has too many arguments specified. problem"? Please only experts. Pin
J4amieC24-Sep-08 2:56
J4amieC24-Sep-08 2:56 
GeneralRe: How can I solve this "Procedure or function StoredProcedure1 has too many arguments specified. problem"? Please only experts. Pin
Blue_Boy24-Sep-08 3:40
Blue_Boy24-Sep-08 3:40 
QuestionAltering a table with SQL manager 2008 Pin
Paw Jershauge23-Sep-08 23:58
Paw Jershauge23-Sep-08 23:58 
AnswerRe: Altering a table with SQL manager 2008 Pin
Wendelius24-Sep-08 8:58
mentorWendelius24-Sep-08 8:58 
GeneralRe: Altering a table with SQL manager 2008 Pin
Paw Jershauge24-Sep-08 9:12
Paw Jershauge24-Sep-08 9:12 
GeneralRe: Altering a table with SQL manager 2008 Pin
Wendelius24-Sep-08 9:20
mentorWendelius24-Sep-08 9:20 
GeneralRe: Altering a table with SQL manager 2008 Pin
Paw Jershauge24-Sep-08 9:29
Paw Jershauge24-Sep-08 9:29 
GeneralRe: Altering a table with SQL manager 2008 [modified] Pin
Wendelius24-Sep-08 9:37
mentorWendelius24-Sep-08 9:37 
GeneralRe: Altering a table with SQL manager 2008 Pin
Paw Jershauge24-Sep-08 9:46
Paw Jershauge24-Sep-08 9:46 
GeneralRe: Altering a table with SQL manager 2008 Pin
Paw Jershauge24-Sep-08 9:56
Paw Jershauge24-Sep-08 9:56 
GeneralRe: Altering a table with SQL manager 2008 Pin
Wendelius24-Sep-08 9:58
mentorWendelius24-Sep-08 9:58 
GeneralRe: Altering a table with SQL manager 2008 Pin
Paw Jershauge24-Sep-08 10:01
Paw Jershauge24-Sep-08 10:01 
GeneralRe: Altering a table with SQL manager 2008 Pin
Wendelius24-Sep-08 10:15
mentorWendelius24-Sep-08 10:15 
GeneralRe: Altering a table with SQL manager 2008 Pin
Paw Jershauge24-Sep-08 10:17
Paw Jershauge24-Sep-08 10:17 
QuestionSAVE PIC IMAGE IN SQL Pin
NasirLCCI200723-Sep-08 23:54
NasirLCCI200723-Sep-08 23:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.