Problem with SQL DataSource and Stored Procedure

I'm trying to call a Stored procedure as my SQLDataSource update command but I'm getting the following error:

"Procedure or function ProcessTravelPolicy has too many arguments specified."

The Update Command looks like this:

                    UpdateCommand="ProcessTravelPolicy" UpdateCommandType="StoredProcedure">

                        <asp:Parameter Name="pol_id" />
                        <asp:Parameter Name="pol_certificate" Type="String" />
                        <asp:Parameter Name="pol_processed" Type="Boolean" />

The Stored Procedure looks like this:

ALTER PROCEDURE dbo.ProcessTravelPolicy
    @pol_id int,
    @pol_certificate nvarchar(50),
    @pol_processed bit


UPDATE TravelPolicies SET pol_certificate = @pol_certificate, pol_processed = @pol_processed WHERE (pol_id = @pol_id)

Doesnt look like there are too many parameters. Any ideas?
8/25/2005 9:34:01 AM 72751 articles. 3 followers. Follow

5 Replies

Similar Articles

[PageSpeed] 14

Try this:

            <asp:Parameter Name="pol_id" Type="int" />
            <asp:Parameter Name="pol_certificate" Type="String" />
            <asp:Parameter Name="pol_processed" Type="Boolean" />

- SH
8/25/2005 11:15:34 AM

Unfortunately it still doesnt work with Type as "Int16" (plain old "int" is not supported)

8/25/2005 11:46:37 AM
How can I see what parameters are being passed to the Stored Procedure at Runtime?

Could I do use a "Try.. Catch.." statement and then output the collection of parameters being passed when the exception occurs

Is that possible?

8/25/2005 12:14:15 PM
You can use SQL Profiler to monitor what SQL the application is passing to the database.
8/31/2005 6:23:34 PM
Unfortunately I'm using SQL Server 2005 Express Edition so do have access to the SQL Profiler.

Thanks for suggestion though.

9/1/2005 5:17:15 PM

Similar Artilces:

Problem accessing SQL Stored Procedure From .Net using hibernate object
Hi, I am calling a SQL Stored procedure from .net application using Hibernate object, but somehow its telling me "The 'callable' attribute is not declared.", I am not sure what's wrong I have done here. Will really appreciate if someone can help me for this. Herewith I am providing my Stored Procedure, my .hbm file and code to call it. can someone pls tell me what's wrong in this? Also, if possible, pls tell me how to set result in a list object. Thanks in advance, ######################################### MY STORED PROCEDURE : ALTER PROCEDURE [dbo].[RulesDetails_...

Stored procedure problem after I move from sql server to sql server 2005
Hi, Guys     I have a problem with a stored procedure. When I used sql express. there was no problem but after I change server from sql express to sql server 2005, I have an error message. The followings are source code and error message when I run program. Please help me to figure it out. This is a behind code in VB Dim tmpchkno As TextBox = FormView1.FindControl("txtchecknoin") Dim tmpchkdate As TextBox = FormView1.FindControl("txtcheckdatein") Dim sqlcon As New SqlClient.SqlConnection Dim sqlcmd...

VB.NET SQL stored procedure: procedure has no parameters and arguments were supplied
VB.NET SQL stored procedure: procedure has no parameters and arguments were supplied Please assist me:This erorr message is produce when calling the stored procedure in vb.netProcedure AutomateMatterNumber has no parameters and arguments were supplied."MS SQL 2000stored procedure:*/CREATE PROCEDURE dbo.AutomateMatterNumber ASDECLARE @nextMtr AS BIGINTDECLARE @dtToday AS DATETIMEIF NOT EXISTS(SELECT * FROM tempMatter WHERE DATEDIFF(dd,DateSet,GETDATE())=0 )BEGINDELETE FROM tempMatter-- incase there are some old recordsSELECT TOP 1 @nextMtr= CONVERT(BIGINT, MatterNumber) + 1 ,@dtTod...

Problem with Oracle Stored Procedures using ODP.NET in VB.NET (VS 2003)
This is the stored procedure,Procedure RetrieveReservations(pProperty In Varchar2,pResHeaderId In Varchar2,pEmail In Varchar2,pPasswd In Varchar2,ResultSet In Out ResCursor);This is the old .asp code (part of it)objConn.ConnectionString = Application("BackEndConnection_ConnectionString")objConn.Open objComm.ActiveConnection = objConn objComm.CommandText = "internet_package.RetrieveReservations"objComm.CommandType = adCmdStoredProc objComm.Parameters.Append objComm.CreateParameter("pProperty", adVarChar , adParamInput, 8, Request.QueryString("propid"))objComm.Parameters.Append objComm.Crea...

Sql store procedure problem
 Hi everyone,I have tried to return values in sqlstore procedure. I dont know how to do it. I have shearched in Internet and tried to find artical about it but I havent find good artical about it yet. ALTER PROCEDURE [dbo].[Comments_return]()ASSELECT comment.ID,comment.uyeID,comment.comment, comment.subject, comment.artical_title, comment.articalComment_time AS Expr1, uyeResimleri.url, uyeler.kullanici_adiFROM comment INNER JOIN uyeler ON comment.uyeID = uyeler.ID INNER JOIN uyeResimleri ON uyeler.ID = uyeResimleri.uyeIDRETURN   Above this code didnt work.   ...

sql stored procedure problem
I'm trying to use stored procedures for the commands for my SQLDataSource.  I've gone through the sqldatasource configuration wizard, all my stored procedures show up in the configuration section.  But when I click "Test Query" I get an error saying "There was an error executing the query. Please check the syntax of the command and if present, the types and values of the parameters and ensure they are correct."  When I try to run the app I get an ASP.NET error of  Server Error in '/' Application. Could not find stored procedure 'user_GetAllUsers (dbo)'. Descriptio...

SQL Stored Procedure Issue
This is the Stored Procedure below ->  SET QUOTED_IDENTIFIER ON GOSET ANSI_NULLS ON GO /****** Object:  Stored Procedure dbo.BPI_SearchArchivedBatches    Script Date: 5/18/2007 11:28:41 AM ******/if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[BPI_SearchArchivedBatches]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)drop procedure [dbo].[BPI_SearchArchivedBatches]GO /****** Object:  Stored Procedure dbo.BPI_SearchArchivedBatches    Script Date: 4/3/2007 4:50:23 PM ******/ /****** Object:  Stored Proc...

SQL Stored Procedure to MySQL Stored Procedure Conversion
Hi, I am trying to convert a stored procedure written for sql to one that will work in mysql. I understand that I have to set the variables as IN , but I don't know what to do with the rest of the code. The following is the sql stored procedure that I am trying to convert to msql stored procedure: CREATE PROCEDURE Register_User (@userName Varchar(50), (@PassWord Varchar(50), (@FirstName Varchar(50), (@LastName Varchar(50) ) AS IF EXISTS(SELECT u_ID FROM User_ID Where u_UserName=@UserName) RETURN -1 ELSE INSERT User_ID( u_User...

SQL Stored procedure problem
I have a classic ASP page that is calling a stored procedure on a SQL2000 SQL shared server.  And it keeps timing out I think because it is taking too long to complete so I want to modify the SP so it does all the work instead of processing each link update on the web server and passing the result back to the SQL Server.  Need help creating an SP that contains the loop that increments throught the Select set and SETS L_Rank using the RAND function.  I need to randomize L_Rank to a number between 25 and 250 for all records where ( L_Rank > 24 AND L_Rank &...

How to convert Sql Server Stored Procedures into Oracle Stored Procedures
Hi All, I am migrating from sql server2000 to oracle. I have moved all table into oracle manually. Now I need to move stored procedure. I don't know how to convert sql server stored procedure into oracle stored procedure form. Is there any tool which will convert directly. Please some one help me. Thank you.    Hi there,Please use the tool bellow, which does the job you want. thanks sharp guy...

MS SQL stored procedures inside another stored procedure
Hi,  Do you know how to write stored procedures inside another stored procedure in MS SQL.   Create procedure spMyProc inputData varchar(50) AS  ----- some logical    procedure spMyProc inputInsideData varchar(10) AS    --- some logical   ---  go ------- What exactly are tou trying to do? ***********************Dinakar NethiLife is short. Enjoy it.*********************** Like Function, you can have one function inside another another function. Function1 () {    Function2() } How about store procedure ? spProc1 { &n...

sql count using stored procedure withing stored procedure
I have a stored procedure that among other things needs to get a total of hours worked. These hours are totaled by another stored procedure already. I would like to call the totaling stored procedure once for each user which required a loop sort of thing for each user name in a temporary table (already done) total = result from execute totaling stored procedure Can you help with this Thanks It would be easier if you can change the stored procedure into a function. Once you do that, the total can be calculated easily with something like thisSelect Sum(dbo.CalculateHours(User...

Counting with SQL in Stored Procedure Problems...
I want to get a list with Columns: Artnnr, Price and Summary (The summary column shall multiply Artnr and Price for each row) Just can´t get this right...  code goes: @Invoice int,@CustomerID nvarchar (50) AS SELECT CustomerID,Artnr,Price,SUM(Artnr * Price) AS Summary FROM Table WHERE Invoice=@Invoice AND CustomerID=@CustomerID   Thanks!  Write your query like below exampleSELECT pub_id, total = SUM(ytd_sales) FROM titles GROUP BY pub_id HAVING SUM(ytd_sales) > 40000   Mark it as answer if it resolves the issue.visit : http://tec...

Problem with Stored Procedure and SqlDataSource Control
I am having problems with a stored procedure that I've created and that I'm trying to use in a SqlDataSource Control.   Here's my stored procedureset ANSI_NULLS ON set QUOTED_IDENTIFIER ON goALTER proc [dbo].[Sp_ZZAppendSO] @Program nvarchar, @AircraftType nvarchar,@SessionType nvarchar AsSelect tblSelMItem.MItemID, tblSelMItem.SeqNbr, tblSelMItem.TaskName, tblSelMItem.SO, tblSelMItem.BeginUse, tblSelMItem.EndUse, tblSelMItem.Program, tblSelMItem.RequiredItem FROM tblSelMItem INNER JOIN tlkpSessionType ON (tblSelMItem.Program = tlkpSessionType.Program) AND (tb...

Web resources about - Problem with SQL DataSource and Stored Procedure -

Datasource - Wikipedia, the free encyclopedia
A DataSource object has properties that can be modified when necessary. For example, if the data source is moved to a different server, the property ...

Inverness Graham Acquires DataSource
Inverness Graham , a lower middle market private equity firm headquartered in suburban Philadelphia, has acquired DataSource , a print supply ...

SmartGlance for iPad for iPad on the iTunes App Store
Read reviews, get customer ratings, see screenshots, and learn more about SmartGlance for iPad on the App Store. Download SmartGlance for iPad ...

Chaitanya Pandit (@chaitanyapandit) on Twitter
Sign in Sign up To bring you Twitter, we and our partners use cookies on our and other websites. Cookies help personalize Twitter content, tailor ...

Data source - Wikipedia, the free encyclopedia
... Data source A data source is any of the following types of sources for (mostly) digitized data: a database in the Java software platform, datasource ...

2ndQuadrant - PostgreSQL expertise from specialists with a source code level understanding of RDBMS ...
PostgreSQL expertise from specialists with a source code level understanding of RDBMS PostgreSQL Planets Gabriele’s PlanetPostgreSQL Gianni’s ...

Tagged entries for CLOUD COMPUTING
Alan Williamson's output as a Java Champion, Blog-City Architect, BlueDragon Creator, Author, Speaker and Internet Guru

Private equity deals
... of biometric identity management systems, applications and services. Inverness Graham Investment has acquired DataSource ...

C# C Sharp and Tutorials on C#
Learn the c# langauge to build web applications using our online tutorials with live demos. Participate in our forums and learn from others. ...

JavaScript UI Library, Ajax Components & HTML5 Framework - DHTMLX
DHTMLX offers a rich JavaScript library, UI components & HTML5 mobile framework. Build impressive web apps for both desktop and mobile devices. ...

Resources last updated: 1/22/2016 1:46:07 PM