Stored Procedure Parameter Supplied But Error Messages Says It's Not

Dec 7, 2007

I keep getting this error on one of my pages when trying to do an update to the table via a stored procedure:

*System.Data.SqlClient.SqlException: Procedure or function 'sp_u_contractor_references' expects parameter '@p_contractorrfid', which was not supplied

 I have verified that I am adding this parameter and that the spelling is correct. I have also made sure that the value is not NULL.

 I'm confused as to what else the problem could be. Any ideas?

View 5 Replies


ADVERTISEMENT

Parameter Doesn't Get Supplied To Stored Procedure

May 9, 2006

I'm rather new at reporting services, so bear with me on this one.

I have a stored procedure in MSSQL called prc_failedSLA_per_week, that has two parameters (@startWeek and @endWeek). I've added a dataset in reporting services which runs my procedure. when I run it from the data tab in RS, I get prompted for values on these two parameters, and a table gets generated. But if I try to preview my report, I get the error "Procedure of function "prc_failedSLA_per_week" expects parameter "@startWeek", which was not supplied".

I've tried to find info on this in the help file to no avail, not even google helps me in any way. I guess it's some kind of newbie mistake, but I simply can't figure out what to do.

Any help would be greatly appreciated!

View 3 Replies View Related

Procedure Or Function 'stored Procedure Name' Expects Parameter Which Was Not Supplied

Mar 26, 2007

Has anyone encountered this before?
Procedure or Function 'stored procedure name' expects parameter '@parameter', which was not supplied.
It seems that my code is not passing the parameter to the stored procedure.
When I click this hyperlink:
<asp:HyperLink
ID="HyperLink1"
Runat="server"
NavigateUrl='<%# "../Division.aspx?CountryID=" + Eval("CountryID")%>'
Text='<%# Eval("Name") %>'
ToolTip='<%# Eval("Description") %>'
CssClass='<%# Eval("CountryID").ToString() == Request.QueryString["CountryID"] ? "CountrySelected" : "CountryUnselected" %>'>
</asp:HyperLink>
it is suppose to get the country name and description, based on the country id.
I am passing the country id like this.
protected void Page_Load(object sender, EventArgs e)
{
PopulateControls();
}
private void PopulateControls()
{
string countryId = Request.QueryString["CountryID"];
if (countryId != null)
{
CountryDetails cd = DivisionAccess.GetCountryDetails(countryId);
divisionNameLabel.Text = cd.Name;
divisionDescriptionLabel.Text = cd.Description;
}
}
To my app code like this:
public struct CountryDetails
{
public string Name;
public string Description;
}
public static class DivisionAccess
{
static DivisionAccess()
public static DataTable GetCountry()
{
DbCommand comm = GenericDataAccess.CreateCommand();
comm.CommandText = "GetCountry";
return GenericDataAccess.ExecuteSelectCommand(comm);
}
public static CountryDetails GetCountryDetails(string cId)
{
DbCommand comm = GenericDataAccess.CreateCommand();
comm.CommandText = "GetCountryDetails";
DbParameter param = comm.CreateParameter();
param.ParameterName = "@CountryID";
param.Value = 2;
param.DbType = DbType.Int32;
comm.Parameters.Add(param);
DataTable table = GenericDataAccess.ExecuteSelectCommand(comm);
CountryDetails details = new CountryDetails();
if (table.Rows.Count > 0)
{
details.Name = table.Rows[0]["Name"].ToString();
details.Description = table.Rows[0]["Description"].ToString();
}
return details;
}
 
As you can see I have two stored procedures I am calling, one does not have a parameter and the other does. The getcountry stored procedure returns the list of countries in a menu that I can click to see the details of that country. That is where my problem is when I click the country name I get
Procedure or Function 'GetCountryDetails' expects parameter '@CountryID', which was not supplied
Someone please help!
 
Thanks Nickdel68

View 5 Replies View Related

Error - Procedure Expects Parameter, Which Was Not Supplied

Aug 24, 2004

Hi,

I created a stored procedure in the sql server. I try to insert a record from the aspx page. But I keep getting this error,
"procedure expects parameter <@firstname>, which was not supplied". This is what I am doing.

cmd.CommandText = "proc_insertuser";
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("@firstname", SqlDbType.VarChar, 50);
cmd.Parameters["@firstname"].Value = txtFirstName.Text
....other parameters

I checked the parameter names, it matches correctly. The parameter does get added to the collection. I checked it using cmd.Parameters.Contains("@firstname") and the value is also correct. Using query analyzer I executed the procedure, I am able to insert a record.

Can anyone tell me what could be the problem.
TAI

View 2 Replies View Related

Error: Procedure Expectes Parameter '###', Which Was Not Supplied

Feb 13, 2008

I created the SP ( just called' SP_TEST') and when I tried to preview the report, I got the following error message:

"Procedure or fucntion 'SP_TEST' expects parameter @SelectWeek, which was not supplied.

This error message appears when you don't supply a value for a parameter expected by a stored procedure.
However, I set up the report parameter for Select Week and default week as well.
Here is what i've done for dataset,Select Week and parameter:




Code Snippet
SELECT DISTINCT Week ,
( SELECT DISTINCT Week FROM DIM_Date
WHERE full_date = CONVERT(VARCHAR(20),GETDATE(),112) ) AS defaultWeek
FROM DIM_Date
WHERE fiscal_year_number IS NOT NULL and @year = fiscal_year_number
ORDER BY Week





Any comments and advice would be greatly appreciated.
Thanks in advance.

View 4 Replies View Related

Error--Procedure 'SP_Insert_NewPipeLine' Expects Parameter '@CompanyId', Which Was Not Supplied.

Jul 2, 2006

Can any body help me in solving this problem.
First I use to get Error which reads "Object Must Implement Iconvertible"
After using the overloaded Sp.paramerers.add() function It started giving this problem.
I am giving the sample code.
ConObject = new SqlConnection(ConString);
ConObject.Open();
string SpString ="dbo.SP_Insert_NewPipeLine";
SqlCommand CmdObject = new SqlCommand(SpString,ConObject);
CmdObject.CommandType = CommandType.StoredProcedure;
CmdObject.Parameters.Add("@RequestTypeId",SqlDbType.Int,4,"0");
//CmdObject.Parameters["@RequestTypeId"].Value= 0;
CmdObject.Parameters.Add("@OnBehalfOf",SqlDbType.Int,4,"21");//Onbehalf of Id
//CmdObject.Parameters["@OnBehalfOf"].Value = 21;

CmdObject.Parameters.Add("@SubmittedBy",SqlDbType.Int,4,ddlSalesRep.SelectedValue.ToString());//Submitted by Id
//CmdObject.Parameters["@SubmittedBy"].Value = ddlSalesRep.SelectedItem.Value;
CmdObject.Parameters.Add("@CompanyId",SqlDbType.Int,4,ddlCustomer.SelectedItem.Value.ToString());//Company_Id
//CmdObject.Parameters["@CompanyId"].Value = ddlCustomer.SelectedItem.Value;
CmdObject.ExecuteScalar();

View 2 Replies View Related

Error: Procedure Or Function Roles_delete Expects Parameter @Role_name, Which Not Supplied...

Feb 12, 2008

Hello guy...i have a problem with my web application...i'm using SqlDataSource and GridView....i'm using store procedure that i've created in my mssql server...the problem is when i'm trying to delete current row...this error alert and said
Error

"Procedure or Function "Roles_delete" expects parameter "@Role_name", which not supplied"
Im new user in asp.net....how i can passing my selected value to this parameter??? This is my code...please help me guy...
Asp.net code
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:PVMCCon %>"
DeleteCommand="Roles_delete" DeleteCommandType="StoredProcedure" SelectCommand="Roles_select"
SelectCommandType="StoredProcedure">
<DeleteParameters>
<asp:Parameter Name="Role_name" Type="String" />
</DeleteParameters>
</asp:SqlDataSource>
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" BackColor="White"
BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px" CellPadding="4" DataKeyNames="Role_application_id"
DataSourceID="SqlDataSource1" ForeColor="Black" GridLines="Vertical">
<FooterStyle BackColor="#CCCC99" />
<Columns>
<asp:CommandField ShowDeleteButton="True" />
<asp:BoundField DataField="Role_application_id" HeaderText="Role_application_id"
ReadOnly="True" SortExpression="Role_application_id" />
<asp:BoundField DataField="Role_name" HeaderText="Role_name" SortExpression="Role_name" />
<asp:BoundField DataField="Role_description" HeaderText="Role_description" SortExpression="Role_description" />
</Columns>
<RowStyle BackColor="#F7F7DE" />
<SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
<HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
<AlternatingRowStyle BackColor="White" />
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
 
Store Procedure
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go

ALTER PROCEDURE [dbo].[Roles_delete]
@Role_name varchar(50)
AS
BEGIN
SET NOCOUNT ON;
DELETE FROM Role
WHERE Role_name=@Role_name
END

 Error

Procedure or Function "Roles_delete" expects parameter "@Role_name", which not supplied"
Please help me guy to settle my problem...

View 3 Replies View Related

Stored Procedures, Error Says Expects Parameter @Lname, Which Was Not Supplied.

Jun 21, 2007

this error comes up when I run a form to supmit information to the DB. .
 
"Procedure or function 'aspnet_Users_CreateUser' expects parameter '@Lname', which was not supplied"
I have it declared in the procedure. so why is it telling me it was not supplied.
Here is what I have:
 
ALTER PROCEDURE [dbo].aspnet_Users_CreateUser
    @ApplicationId   uniqueidentifier,
    @UserName   nvarchar(256),
    @IsUserAnonymous  bit,
    @LastActivityDate DATETIME,
  
    @Fname varchar(50) OUTPUT,
    @Lname  nvarchar(50) OUTPUT,
    @Address nvarchar(50) OUTPUT,
    @City  varchar(50) OUTPUT,
    @State  nchar(2) OUTPUT,
    @Zip  nchar(5) OUTPUT,
@RefNum  nchar(10) OUTPUT,@UserId  uniqueidentifier OUTPUTASBEGIN     IF( @UserId IS NULL )        SELECT @UserId = NEWID()    ELSE    BEGIN        IF( EXISTS( SELECT UserId FROM dbo.aspnet_Users                    WHERE @UserId = UserId ) )            RETURN -1    ENDINSERT dbo.aspnet_Users (ApplicationId, UserId, UserName, LoweredUserName, IsAnonymous, LastActivityDate, Fname, Lname, Address, City, State, Zip, RefNum)    VALUES (@ApplicationId, @UserId, @UserName, LOWER(@UserName), @IsUserAnonymous, @LastActivityDate, @Fname, @Lname, @Address, @City, @State, @Zip, @RefNum)     RETURN 0END
Thanks in advance

View 3 Replies View Related

Procedure Expects Parameter Which Was Not Supplied

Mar 23, 2007

Here is my code. Please help me evaluate? Why do i get thiis error. What am i doing wrong: System.Data.SqlClient.SqlException: Procedure 'SearchHRMS' expects parameter
'@SearchString', which was not supplied 1 If Not IsPostBack Then
2 '2 - declare variables
3 Dim conn As SqlConnection
4 Dim cmd As SqlCommand
5
6 '3 - create connection
7 conn = New SqlConnection
8 conn.ConnectionString = ConfigurationManager.ConnectionStrings("HRMSConnectionString").ConnectionString
9 conn.Open()
10
11 '4 - create command
12 cmd = New SqlCommand
13 cmd.CommandType = CommandType.StoredProcedure
14 cmd.CommandText = "SearchHRMS"
15 '4.2 -Declare a parameter
16 Dim param As SqlParameter
17 param = New SqlParameter("@SearchString", SqlDbType.VarChar, 20)
18 param.Direction = ParameterDirection.Input
19 param.Value = "john"
20
21 '5-Link command to connection
22 cmd.Connection = conn
23
24 'EmployeeListDataList.DataSource = cmd.ExecuteReader()
25 'EmployeeListDataList.DataBind()
26 'GridView1.DataSource = cmd.ExecuteReader()
27 'GridView1.DataBind()
28 conn.Close()
29 End If
  

View 3 Replies View Related

Procedure Expects Parameter Which Was Not Supplied

Nov 25, 2007

 Hi everyone, can you please take a look at this code and tell me where I'm wrong.I am getting the error Procedure 'usp_Insert_Attribution' expects parameter '@At_Code', which was not supplied <asp:SqlDataSource
id="ds_Attribution"
runat="server"
SelectCommand="usp_Select_Attribution"
SelectCommandType="StoredProcedure"
InsertCommand="usp_Insert_Attribution"
InsertCommandType="StoredProcedure"
DeleteCommand="usp_Delete_Attribution"
DeleteCommandType="StoredProcedure"
UpdateCommand="usp_Update_Attribution"
UpdateCommandType="StoredProcedure">
<SelectParameters>
<asp:Parameter Name="At_ID" Type="Int32"/>
</SelectParameters>
<InsertParameters>
<asp:Parameter Name="Identity" Direction="Output" Type="Int32"/>
</InsertParameters>
<DeleteParameters>
<asp:Parameter Name="At_ID" Type="Int32"/>
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="At_ID" Type="Int32"/>
</UpdateParameters>
</asp:SqlDataSource>   <InsertItemTemplate>
<table>
<tr>
<td>Attribution Code</td>
<td>
<asp:Textbox ID="txtAt_Code" runat="server" Text='<%# Eval("At_Code") %>' CssClass="textbox" />
<asp:RequiredFieldValidator ID="rfvAt_Code" runat="server" ControlToValidate="txtAt_Code"
Display="Static" Text="*" ErrorMessage="Attribution Code must be entered." />
<asp:CustomValidator ID="cvAt_Code" runat="server" Text="*" ErrorMessage="Attribution Code already exists."
Display="Static" />
</td>
</tr>
<tr>
<td>Attribution Description</td>
<td>
<asp:Textbox ID="txtAt_Description" runat="server" CssClass="textBox_Multiline" maxlength="250" TextMode="MultiLine" Text='<%# Bind("At_Description") %>'></asp:Textbox>
</td>
</tr>
</table>

</table>
<asp:Panel ID="pnlAttributionOptions_I" runat="server" GroupingText="Options" CssClass="panel">
<table width="100%">
<tr>
<td><asp:LinkButton ID="lnkCancel" runat="server" Text="Cancel" CommandName="Cancel" CssClass="button" CausesValidation="false"></asp:LinkButton>
</td><td><asp:LinkButton ID="lnkInsert" runat="server" Text="Save" CommandName="Insert" CssClass="button"></asp:LinkButton>
</td></tr></table>
</asp:Panel>

</InsertItemTemplate>  CREATE PROCEDURE dbo.usp_Insert_Attribution
(
@At_Code varchar(10),
@At_Description varchar(250),
@At_SystemDate datetime,
@Identity int OUT
)
AS
SET NOCOUNT OFF;
INSERT INTO Attribution (At_Code, At_Description, At_SystemDate)
VALUES (@At_Code,@At_Description, @At_SystemDate);

SELECT * FROM Attribution WHERE (At_ID = SCOPE_IDENTITY())
SET @Identity = SCOPE_IDENTITY()
GO
  

View 2 Replies View Related

Procedure 'x' Expects Parameter '@y' Which Was Not Supplied.

Feb 24, 2004

I'm trying to update a member's record via stored procedure. The procedure is thus:

*********************************
CREATE PROCEDURE upd_MemberProfile(
@MemberID VarChar(10),
@FirstName VarChar(20),
@LastName VarChar(20),
@Address VarChar(50),
@City VarChar(40),
@StateID Char(2),
@ZipCode Char(5),
@Email VarChar(30),
@PayPalSubscrID VarChar(22)
) AS

UPDATE Members
SET FirstName = @FirstName, LastName = @LastName, Address = @Address, City = @City, StateID = @StateID, ZipCode = @ZipCode, Email = @Email, PayPalSubscrID = @PayPalSubscrID
WHERE MemberID = @MemberID
GO
*****************************

The call from the Webpage is like so:

*****************************
...
Dim Subscr_id As String = "123ABC-HDTV"

Try
cmd.CommandText = dbo() & "upd_MemberProfile"
cmd.CommandType = CommandType.StoredProcedure

With cmd.Parameters
.Add("@MemberID", MemberID)
.Add("@FirstName", FirstName)
.Add("@LastName", LastName)
.Add("@Address", Address)
.Add("@City", City)
.Add("@StateID", StateID)
.Add("@ZipCode", ZipCode)
.Add("@Email", Payer_email)
.Add("@PayPalSubscrID", Subscr_id)
End With


If cnn.State.Open Then
cnn.Close()
End If

cnn.Open()
cmd.ExecuteNonQuery()
cnn.Close()

Catch ex As Exception

'Notify Admin of the Problem
MailUsTheOrder("ERROR on upd_MemberProfile: " & ex.Message)

'Close the SQL Connection
If cnn.State.Open Then
cnn.Close()
End If
End Try
******************************

This was working two weeks ago. I have changed NOTHING and now I get the error:

Procedure 'upd_MemberProfile' expects parameter '@PayPalSubscrID', which was not supplied.

Any Ideas?

View 2 Replies View Related

Procedure Expects Parameter Not Supplied

Oct 31, 2004

Hi - Im working with a sign up page in which I'd like to include the date that the member signed up. I keep getting this error and I was wondering if anyone could help. The error is:

Procedure 'spAddCustomer' expects parameter '@MemberSince', which was not supplied.

I have the date in a label on the form and then I am passing to the database with:

cmdAddCustomer.Parameters.Add("@MemberSince", today_date.text).

Can anyone help with what I am doing wrong? Thanks!

View 9 Replies View Related

Procedure Expects Parameter Which Was Not Supplied

Sep 8, 2007


why is this? I posted this to the Windows forms group but this may be a problem with my spro?
here is the;
1. sproc in SQL Server Express (on Vista)
2. the code ( vb.net VS2008 Beta 2)
3. the error
http://www.hazzsoftwaresolutions.net/sprocParam_ex.htm

Thank you for any help.
Greg

View 5 Replies View Related

Procedure Expects Parameter Which Was Not Supplied...?

Jan 26, 2007

I have this SP definition and below that the code to execute it from .Net. But I'm getting this error: Procedure 'GetNewId' expects parameter '@Key', which was not supplied.

Saw an solution on some site which said to set the value of the output param to NULL before calling it, but that didn't do anything.

Anyone have any ideas why this may be happening?? Thanks in advance.

CREATE PROC GetNewId(@TableName varchar(32), @Key bigint OUTPUT) AS
Declare @NextKey bigint
BEGIN TRAN

SELECT @NextKey = NewID from ID where TableName = @TableName
IF (SELECT @NextKey)IS NULL
BEGIN
INSERT INTO ID(NewID, TableName) VALUES(0, @TableName)
END

UPDATE ID
SET NewID = NewID + 1 Where TableName = @TableName

SELECT @NextKey = NewID from ID where TableName = @TableName

SET @Key=@NextKey

COMMIT TRAN

Return @Key

GO

---------------------------------------------------------------------------------------------
_SQLCommand.CommandText = theCommStr;
_SQLCommand.CommandType = CommandType.StoredProcedure;

SqlParameter aInputTblPrm = new SqlParameter("@TableName", "Jack");
aInputTblPrm.Direction = ParameterDirection.Input;

SqlParameter aReturnKeyPrm = new SqlParameter("@Key", SqlDbType.BigInt);
aReturnKeyPrm.Direction = ParameterDirection.InputOutput;

_SQLCommand.Parameters.Add(aInputTblPrm);
_SQLCommand.Parameters.Add(aReturnKeyPrm);

_SQLCommand.ExecuteNonQuery();

View 9 Replies View Related

Passing Error Messages From Stored Procedure To Osql Command

Oct 7, 2004

I have a process that is running on the os. This process is picking up FTP files every 5 min, it renames them so not to confuse them with the new files, copies all renamed files into one file to be used by bulk insert, runs the bulk insert to populate a table, and then runs the stored procedure that scrubbing the data and insert it into another table. For every transaction that I do in my stored procedure, I do the error checking as follows:

IF @@error <> 0
BEGIN
ROLLBACK TRANSACTION
RETURN

If my stored procedure encounters an error, return statement will stop it from running. If this happens, I need to stop the process that is running on the os as well.

Questions:

How can that be accomplished?

How to restart the stored procedure ones the error has been corrected?

Thank you for your help.

View 3 Replies View Related

Procedure X Expects Parameter '@dealer', Which Was Not Supplied.

Apr 23, 2008

Hi
In my code I do this
Dim ds As DataSet = SqlHelper.ExecuteDataset(System.Configuration.ConfigurationManager.ConnectionStrings("ConnectionString").ToString(), "usp_SearchCar", dealer, vehicleType, bodyType, make, model, engineType, year, minPrice, maxPrice, transmission)
But I get the error (in the subject)
I check and the value of dealer is an empty string but that's ok right?
ThanksP
 

View 3 Replies View Related

Procedure 'JaiDeleteUser' Expects Parameter '@user_name', Which Was Not Supplied

Feb 10, 2008

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server"><title>Untitled Page</title> </head>
<body>
 
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
 
<div>
 
<br />
<asp:Label ID="lblUserInfo" runat="server" Text="Label"></asp:Label><asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:JaiConnectionString %>" DeleteCommand="JaiDeleteUser" DeleteCommandType="StoredProcedure" SelectCommand="SELECT users.user_name, users.user_pass, user_roles.role_name, users.VendorId FROM users INNER JOIN user_roles ON users.user_name = user_roles.user_name"
UpdateCommand="JaiUpdateUser" UpdateCommandType="StoredProcedure">
<DeleteParameters>
<asp:Parameter Name="user_name" Type="String" />
<asp:Parameter Name="user_pass" Type="String" />
<asp:Parameter Name="role_name" Type="String" />
<asp:Parameter Name="VendorId" Type="Int32" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="user_name" Type="String" />
<asp:Parameter Name="user_pass" Type="String" />
<asp:Parameter Name="role_name" Type="String" />
<asp:Parameter Name="VendorId" Type="Int32" />
</UpdateParameters>
</asp:SqlDataSource><asp:GridView ID="GridView1" runat="server" AllowSorting="True"
AutoGenerateColumns="False" DataSourceID="SqlDataSource1">
<Columns>
<asp:CommandField ShowDeleteButton="True" ShowEditButton="True" /><asp:BoundField DataField="user_name" HeaderText="user_name"
SortExpression="user_name" /><asp:BoundField DataField="user_pass" HeaderText="user_pass"
SortExpression="user_pass" /><asp:BoundField DataField="role_name" HeaderText="role_name"
SortExpression="role_name" /><asp:BoundField DataField="VendorId" HeaderText="VendorId"
SortExpression="VendorId" />
</Columns>
</asp:GridView>
<br />
<br />
</div></form> </body>
</html>
 
 
<<<<<<<<<<<<<Stored Procedure>>>>>>>>>>>>>>>>
CREATE PROCEDURE [dbo].[JaiDeleteUser] @user_name varchar (25), @user_pass varchar (25), @role_name Varchar (15), @VendorId intAS
beginDelete from user_roles where user_name =@user_nameDELETE FROM [users] WHERE user_name =@user_nameendGO
I am getting the error
Procedure 'JaiDeleteUser' expects parameter '@user_name', which was not supplied
whenever I try to delete a record. While Updating works with no problem. Please help.

View 8 Replies View Related

Procedure Or Function 'syl_EmailQueueInsert' Expects Parameter '@EmailCC', Which Was Not Supplied.

Oct 25, 2006

We have a email table in the database (SQL Server 2005). When we try to execute the Insert Stored Proc in the database to add a record and leave the EmailCC and EmailBCC fields blank we are getting the following error: Msg 201, Level 16, State 4, Procedure syl_EmailQueueInsert, Line 0Procedure or Function 'syl_EmailQueueInsert' expects parameter '@EmailCC', which was not supplied. The EmailCC and EmailBCC are set to allow nulls. Shouldn’t the system automatically insert nulls into those colums if no value is supplied??? What am I doing wrong? Newbie

View 4 Replies View Related

Procedure Or Function 'retrieve_product' Expects Parameter '@productPrice', Which Was Not Supplied.

Nov 11, 2007

Hi i am getting this error whenever i try to execute a stored procedure, below is my stored procedure;
 ALTER PROCEDURE [dbo].[retrieve_product]
-- Add the parameters for the stored procedure here
@productPrice decimal (10,2),
@productInfoURL varchar (255),
@categoryName varchar (255),@companyName varchar (255),
@subCategoryName varchar (255),
@companyWebsiteURL varchar (255)
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
-- Insert statements for procedure here
SELECT Categories.categoryName, SubCategories.subCategoryName,Companies.companyName, Products.productPrice,
Products.productInfoURL FROM Categories
INNER JOIN Products ON Categories.categoryID = Products.categoryID
INNER JOIN Companies ON Products.companyID = Companies.companyID
INNER JOIN SubCategories ON Categories.categoryID = SubCategories.categoryID AND Products.subcategoryID = SubCategories.subCategoryID
END
 

View 8 Replies View Related

SQL_Error Procedure 'DelectHostName' Expects Parameter '@Host', Which Was Not Supplied.

Feb 21, 2008

How do I supply the parameter @Host?  Below is the part of my code that has the call to the stored procedure 
public void DeleteHostName()
{ // start of the method
using (SqlConnection cn = new SqlConnection(ConfigurationManager.AppSettings["ConnectionString"]))            {
                cn.Open();                SqlCommand cmd = new SqlCommand("hnDeleteHost", cn);                cmd.CommandType = CommandType.StoredProcedure;                cmd.Parameters.Add(new SqlParameter("@pHostID", SqlDbType.VarChar, 50, "HostNameID"));                cmd.Parameters.Add(new SqlParameter("@pRet", SqlDbType.Int, 0, ParameterDirection.Output, false, 0, 0, " ", DataRowVersion.Default, null));                cmd.UpdatedRowSource = UpdateRowSource.None;                cmd.ExecuteNonQuery();            }

View 1 Replies View Related

Procedure Or Function 'SubscribeToNewsletters' Expects Parameter '@emailAddress', Which Was Not Supplied.

Mar 21, 2008

Hi i have been trying to insert some values selected in a checkbox list into the database, however it is giving me the following error "Procedure or Function 'SubscribeToNewsletters' expects parameter '@emailAddress', which was not supplied. "public void Page_Load(object sender, EventArgs e) -- on page load the checkbox list is populated through stored procedure (stream_NewsletterTypes)
{
try
{SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["streamConnectionString"].ConnectionString);
SqlCommand command = new SqlCommand("stream_NewsletterTypes", conn); command.CommandType = CommandType.StoredProcedure;
command.Connection.Open();SqlDataReader datareader = command.ExecuteReader();
AlertList.DataSource = datareader;AlertList.DataTextField = "newsletterName";
AlertList.DataBind();
command.Connection.Close();
command.Connection.Dispose();
}catch (Exception ex)
{throw new Exception("Exception. " + ex.Message);
}
}
 protected void Btn_Subscribe_Click(object sender, EventArgs e) when the button is clicked, the values should be sent to the database
{SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["streamConnectionString"].ConnectionString);
SqlCommand command = new SqlCommand("stream_NewsletterTypes", conn);command.CommandType = CommandType.StoredProcedure;for (int i = 0; i < AlertList.Items.Count; i++)
{if (AlertList.Items[i].Selected)
{
command.Parameters.AddWithValue("firstName", txtFirstName.Text);command.Parameters.AddWithValue("surname", txtSurname.Text);
command.Parameters.AddWithValue("emailAddress", txtEmail.Text);command.Parameters.AddWithValue("newsletterID", AlertList.Items[i].Value);
}
}
try
{
conn.Open();
command.ExecuteNonQuery();
}catch (Exception ex)
{throw new Exception("Exception adding account. " + ex.Message);
}
finally
{
conn.Close();
}
}
 
And my stored procedure;ALTER PROCEDURE [dbo].[SubscribeToNewsletters]
@emailAddress VARCHAR(250),
@firstName VARCHAR(250),
@surname VARCHAR(250),
@newsletterID INT,@userID INT OUTPUT
AS
INSERT INTO ThinkUsers (emailAddress, firstName, surname)
VALUES
(@emailAddress, @firstName, @surname)
Select @userID = @@Identity -- this is the ID created in the TheUserTable
-- when you make that first insert, the database
-- will generate the next ID value in that table
INSERT INTO SubscribedNewsletters (userID, newsletterID)
VALUES
(@userID, @newsletterID)

View 26 Replies View Related

Procedure Or Function 'selectFromView' Expects Parameter '@Year', Which Was Not Supplied. ???

May 21, 2008

 hay all, i'm trying to pass parameters to a stored procedure ..and i keep getting this error "Procedure or function 'selectFromView' expects parameter '@Year', which was not supplied." this is the procedure implementation : ALTER PROCEDURE dbo.selectFromView

@Year as varchar(10),
@Country as varchar(10),
@Family as varchar(10),
@Manu as varchar(10),
@Status as varchar(10),
@Type as varchar(10),
@Operator as varchar(10)


AS
SELECT * FROM ViewofAll
WHERE
ProductionYear = @Year and
CountryName = @Country and
Family = @Family and
Manufacturer = @Manu and
Status = @Status and
Type = @Type and
OperatorName = @Operator

RETURN and below how i call the procedure :   Dim connection As SqlConnection
connection = New SqlConnection()
connection.ConnectionString = "Data Source=BLACKIRIS3SQLEXPRESS;Initial Catalog=Aircrafts;Integrated Security=True"
connection.Open()
Dim command As SqlCommand
command = New SqlCommand("selectFromView", connection)
command.CommandType = CommandType.StoredProcedure
command.Parameters.Add(New SqlParameter("@Year", System.Data.SqlDbType.VarChar, 100)).Direction = ParameterDirection.Input
command.Parameters.Add(New SqlParameter("@Country", System.Data.SqlDbType.VarChar, 100)).Direction = ParameterDirection.Input
command.Parameters.Add(New SqlParameter("@Family", System.Data.SqlDbType.VarChar, 100)).Direction = ParameterDirection.Input
command.Parameters.Add(New SqlParameter("@Manu", System.Data.SqlDbType.VarChar, 100)).Direction = ParameterDirection.Input 'Stored prcedure parameters
command.Parameters.Add(New SqlParameter("@Status", System.Data.SqlDbType.VarChar, 100)).Direction = ParameterDirection.Input
command.Parameters.Add(New SqlParameter("@Type", System.Data.SqlDbType.VarChar, 100)).Direction = ParameterDirection.Input
command.Parameters.Add(New SqlParameter("@Operator", System.Data.SqlDbType.VarChar, 100)).Direction = ParameterDirection.Input
command.Parameters.Item("@Year").Value = myArray(0)
command.Parameters.Item("@Country").Value = myArray(1)
command.Parameters.Item("@Family").Value = myArray(2)
command.Parameters.Item("@Manu").Value = myArray(3)
command.Parameters.Item("@Status").Value = myArray(4)
command.Parameters.Item("@Type").Value = myArray(5)
command.Parameters.Item("@Operator").Value = myArray(5)
DSGrid.SelectCommand = command.CommandText With DSGrid
.DataBind()
End With  i'm not really familiar with stored procedures ...any one can help me plz ?  thanx in advance .  

View 3 Replies View Related

Please Help, Procedure 'sp_displaylabels' Expects Parameter '@mod_id', Which Was Not Supplied In Asp.net Form

Aug 27, 2004

Procedure 'sp_displaylabels' expects parameter '@mod_id', which was not supplied.

I get the error at the SQLAdptr1.Fill(DS): Procedure 'sp_displaylabels' expects parameter '@mod_id', which was not supplied.

But i am passing the @mod_id value in the string Valmodid.


Private Sub BindData()
Dim DS As New DataSet
Dim SQLCmd1 As New SqlCommand
Dim moduleId As New SqlParameter
Dim Valmodid As String

Valmodid = Request.QueryString("modid")

moduleId = SQLCmd1.Parameters.Add("@mod_id", Valmodid)

SQLCmd1 = New SqlCommand("sp_displaylabels", MyConnection)

Dim SQLAdptr1 As SqlDataAdapter = New SqlDataAdapter(SQLCmd1)

SQLAdptr1.Fill(DS)

MyDataGrid.DataSource = DS
MyDataGrid.DataBind()
End Sub

'''My Stored Procedure code:
CREATE PROCEDURE [dbo].[sp_displaylabels]
(
@mod_id nvarchar(10)
)
AS
SELECT *
FROM tbl_labels
where module_id=@mod_id ORDER BY id ASC
GO

View 1 Replies View Related

Procedure Or Function 'insertProjectDetails' Expects Parameter '@ProjectTitle', Which Was Not Supplied.?

Jan 4, 2007

Running [dbo].[insertProjectDetails] ( @ProjectTitle = <DEFAULT>, @ProjectPeriod = <DEFAULT>, @Client = <DEFAULT>, @Position = <DEFAULT>, @ProjectDescription = <DEFAULT>, @Responsiblities = <DEFAULT>, @OtherInformation = <DEFAULT> ).

Procedure or Function 'insertProjectDetails' expects parameter '@ProjectTitle', which was not supplied.

No rows affected.

(0 row(s) returned)

@RETURN_VALUE =

Finished running [dbo].[insertProjectDetails].

Can any body send solution for this error?

View 5 Replies View Related

Reporting Services :: Procedure Or Function Create Session Expects Parameter Which Was Not Supplied

Jun 4, 2015

When i open any reports getting the below error message.An error occurred within the report server database. This may be due to a connection failure, timeout or low disk condition within the database.

(rsReportServerDatabaseError)Procedure or function 'CreateSession' expects parameter '@SiteZone', which was not supplied.  

View 7 Replies View Related

Reporting Services :: SSRS Errors - Procedure Or Function Expects Parameter Which Was Not Supplied

Nov 23, 2015

I have a report that uses a stored procedure as a dataset.The stored procedure accepts four parameters, which I have defined in the report. works fine in query builder and SSMS.

When I run the report I get an error stating a parameter is missing. I tried deleting parameters and recreating not luck.

View 4 Replies View Related

SqlException - Error Expects Parameter HostID; Which Was Not Supplied

Feb 21, 2008

Why am I getting this error, what does it mean and how can I fix it. Here is my stored proceduce and method to call it.
ALTER PROCEDURE dbo.hnDeleteHost(@pHostID varchar(50), @pRet int out)AS
SELECT Host FROM HostName WHERE HostNameID = @pHostID
if (@@ROWCOUNT > 0) begin DELETE FROM HostName WHERE HostNameID = @pHostID SET @pRet = @@ROWCOUNTendelse begin SET @pRet = -1end
 And the method
using (SqlConnection cn = new SqlConnection(ConfigurationManager.AppSettings["ConnectionString"]))            {
                cn.Open();                SqlCommand cmd = new SqlCommand("hnDeleteHost", cn);                cmd.CommandType = CommandType.StoredProcedure;                cmd.Parameters.Add(new SqlParameter("@pHostID", SqlDbType.VarChar, 50, "HostNameID"));                cmd.UpdatedRowSource = UpdateRowSource.None;                cmd.ExecuteNonQuery();            }

View 4 Replies View Related

Rendering Without Parameter Values Supplied Give Error

Dec 21, 2005

Hi

I hope someone can help me out here.  I'm quite new to RS so perhaps this is just me not knowing something obvious.

I have a report with several parameters, most of which have values the user can select from a list, supplied by a query.  Some of these lists are filtered depending on the value of other parameters.  (Eg One list has all customers, one list has all orders.  If I select a customer, the order list changes to only contain orders for the selected customer.)  Some of the parameters are just float or date values that do not rely on any other parameters being selected first (eg OrderDate).  Some parameters have default values and some do not.

When I first go into the report in Report Manager it is fine and does not automatically render - as not all parameters have values supplied.

The problem is that as soon as I select a parameter value from the list when that value is part of the query for another parameters values, the report renders automatically - without some of the other parameters being supplied yet - and consequently errors with the rsReportParameterTypeMismatch error.  (Eg I select a customer and the report renders before I can enter the OrderDate parameter.)

How can I stop the report automatically rendering before I have entered/selected values for all the parameters?

Thanks, Phaedra

View 1 Replies View Related

I Am Getting This Message System.Data.SqlClient.SqlException: Xp_sendmail: Procedure Expects Parameter @user, Which Was Not Supplied.

Jun 21, 2005

I have looked all over my code and can not find anywhere that I am referencing the xp_sendmail procedure! Here is all the code<code>With sqlCmdUpdateParticipants
.Parameters("@ClassID").Value = ddlClass.SelectedItem.Value
.Parameters("@Person").Value = tbName.Text()
End With
cnCapMaster.Open()
sqlCmdUpdateParticipants.ExecuteNonQuery()
cnCapMaster.Close()</code>I am just getting a couple values and and inserting them into the database.  the insert works then I get darn error message.  This code worked at one time but it has been about 2 years sense I worked on it so who knows what might have happened sense then.Thanks,Bryan

View 6 Replies View Related

Exception Details: System.Data.SqlClient.SqlException: Procedure 'spInsertBillingQ' Expects Parameter '@bankname', Which Was Not Supplied.

Mar 1, 2007

Hello Coders,
 I need help fixing a problem in my code that I do not understand. I basically have a procedure that is supposed to take all user information and then insert it to the DB or update the Database based on user entry.
The call to the method is this
Dim bankname As String = ""
If (objBill.BillTransaction(Session("conString"), Session("whattobill"), PROC_CURR, Session("lISN"), 0, Session("fISN"), Request.ServerVariables("REMOTE_ADDR"), "scott@mycleanstart.com", Session("fAmount"), Session("first_name"), Session("last_name"), Session("city"), Session("state"), Session("phone"), Session("address1"), Session("address2"), Session("postal_code"), Session("email_address"), Session("fDesc"), Session("ssn"), Session("nameoncard"), Session("PAN"), Session("cvv"), Session("cardexpirationdate"), bankname, Session("txtroutingnumber"), Session("txtaccountnumber"), Session("txtchecknumber"), Session("bqISN"), _
returnedbqISN, AuthCode, OrderNumber, DeclineCode, TermCode, ErrorMessage, authenticationValue, authenticationTransactionID, str_Centinal_ECI, "signup", PAResStatus, SignatureVerification, paypalSubAgreeID, notificationLocation, strErrorNo, strErrorDesc, strTransactionID, strStatus, strStatusCode, strReasonCode)) Then
 
 And then below is the actual method itself........
NOTE: The code below is contained in a DLL
 
 
 
 
 1 public bool BillTransaction(string strDBInstance, string ccORach, string whichProcessor,Int32 lISN, Int32 mISN,
2 Int32 fISN, string ip,string merchant_email,string total_amount,
3 string firstname, string lastname, string city,string state, string phone, string address1,string address2, string zip, string customer_email,
4 string product_desc, string socialsecuritynum, string nameoncard, string creditcardnumber, Int32 cardverifynum, DateTime cardexpiredate,
5 string bankname, string routingnumber, string accountnumber, string checknumber, Int32 bqISN,
6 ref Int32 returnedbqISN, ref string AuthCode, ref string OrderNumber, ref string DeclineCode,
7 ref string TermCode, ref string ErrorMessage,
8 string authenticationValue,string authenticationTransactionID,string eci,string transactiontype,
9 string PAResStatus, string SignatureVerification, string paypalSubAgreeID, string notificationLocation,
10 ref string strErrorNo, ref string strErrorDesc, ref string strTransactionId, ref string strStatus,
11 ref string strStatusCode, ref string strReasonCode)
12
13 {
14
15 if (ccORach.Trim().Length <= 0)
16 {
17 ErrorMessage = "CC or Check?";
18 return false;
19 }
20
21 if (whichProcessor.Trim().Length <= 0)
22 {
23 ErrorMessage = "Blank processor";
24 return false;
25 }
26
27 decimal grand_total = Convert.ToDecimal(decimal.Parse(total_amount).ToString("N2"));
28 string ProcessorResponse="";
29 Database db = DatabaseFactory.CreateDatabase(strDBInstance);
30 DBCommandWrapper dbCmdWrapper = null;
31 bool retBilling = true;
32 string sql = "";
33 string bqAction = "SBILL";
34 string strFirstName = "";
35 string strLastName = "";
36 string[] cardname = nameoncard.Split(new char[] {' '});
37 strFirstName = cardname[0];
38 for (int i=1; i <= cardname.GetUpperBound(0); i++)
39 {
40 strLastName = strLastName + ' ' + cardname[i].Trim();
41 }
42
43 MCS_Encryption.Encryption mcscrypt = new MCS_Encryption.Encryption();
44 //card number
45 string enc_cardnumber = mcscrypt.Encrypt(creditcardnumber);
46 //account number
47 string enc_accountnumber = mcscrypt.Encrypt(accountnumber);
48
49 if (bqISN > 0)
50 {
51 //if bqISN is present, do UPDATE instead
52 sql = "spUpdateBillingQ";
53 dbCmdWrapper = db.GetStoredProcCommandWrapper(sql);
54 dbCmdWrapper.AddInParameter("@bqISN",DbType.Int32,bqISN);
55 dbCmdWrapper.AddInParameter("@email",DbType.String,customer_email);
56 dbCmdWrapper.AddInParameter("@bankname",DbType.String,bankname);
57 dbCmdWrapper.AddInParameter("@routingnumber",DbType.String,routingnumber);
58 dbCmdWrapper.AddInParameter("@accountnumber",DbType.String,enc_accountnumber);
59 dbCmdWrapper.AddInParameter("@checknumber",DbType.String,checknumber);
60 dbCmdWrapper.AddInParameter("@nameoncard",DbType.String,nameoncard);
61 dbCmdWrapper.AddInParameter("@cardnumber",DbType.String,enc_cardnumber);
62 dbCmdWrapper.AddInParameter("@cardverifynum",DbType.Int32,cardverifynum);
63 dbCmdWrapper.AddInParameter("@cardexpirationdate",DbType.DateTime,cardexpiredate);
64 dbCmdWrapper.AddInParameter("@billaddress1",DbType.String,address1);
65 dbCmdWrapper.AddInParameter("@billaddress2",DbType.String,address2);
66 dbCmdWrapper.AddInParameter("@billcity",DbType.String,city);
67 dbCmdWrapper.AddInParameter("@billstate",DbType.String,state);
68 dbCmdWrapper.AddInParameter("@billzip",DbType.String,zip);
69 dbCmdWrapper.AddInParameter("@billphone",DbType.String, phone);
70 dbCmdWrapper.AddInParameter("@ip",DbType.String, ip);
71 dbCmdWrapper.AddInParameter("@fISN",DbType.Int32, fISN);
72 dbCmdWrapper.AddInParameter("@price",DbType.Currency, grand_total);
73 dbCmdWrapper.AddInParameter("@description",DbType.String, product_desc);
74 dbCmdWrapper.AddInParameter("@bqaction",DbType.String, bqAction);
75 dbCmdWrapper.AddInParameter("@creditamount",DbType.Currency, 0);
76 dbCmdWrapper.AddInParameter("@processor",DbType.String, whichProcessor);
77 db.ExecuteNonQuery(dbCmdWrapper) ;
78
79 returnedbqISN = bqISN;
80 }
81 else
82 {
83 //insert into billingQ or update if bqISN is passed
84 sql = "spInsertBillingQ";
85 dbCmdWrapper = db.GetStoredProcCommandWrapper(sql);
86 dbCmdWrapper.AddInParameter("@lISN",DbType.Int32,lISN);
87 dbCmdWrapper.AddInParameter("@mISN",DbType.Int32,mISN);
88 dbCmdWrapper.AddInParameter("@email",DbType.String,customer_email);
89 dbCmdWrapper.AddInParameter("@bankname",DbType.String,bankname);
90 dbCmdWrapper.AddInParameter("@routingnumber",DbType.String,routingnumber);
91 dbCmdWrapper.AddInParameter("@accountnumber",DbType.String,enc_accountnumber);
92 dbCmdWrapper.AddInParameter("@checknumber",DbType.String,checknumber);
93 dbCmdWrapper.AddInParameter("@nameoncard",DbType.String,nameoncard);
94 dbCmdWrapper.AddInParameter("@cardnumber",DbType.String,enc_cardnumber);
95 dbCmdWrapper.AddInParameter("@cardverifynum",DbType.Int32,cardverifynum);
96 dbCmdWrapper.AddInParameter("@cardexpirationdate",DbType.DateTime,cardexpiredate);
97 dbCmdWrapper.AddInParameter("@billaddress1",DbType.String,address1);
98 dbCmdWrapper.AddInParameter("@billaddress2",DbType.String,address2);
99 dbCmdWrapper.AddInParameter("@billcity",DbType.String,city);
100 dbCmdWrapper.AddInParameter("@billstate",DbType.String,state);
101 dbCmdWrapper.AddInParameter("@billzip",DbType.String,zip);
102 dbCmdWrapper.AddInParameter("@billphone",DbType.String, phone);
103 dbCmdWrapper.AddInParameter("@ip",DbType.String, ip);
104 dbCmdWrapper.AddInParameter("@fISN",DbType.Int32, fISN);
105 dbCmdWrapper.AddInParameter("@price",DbType.Currency, grand_total);
106 dbCmdWrapper.AddInParameter("@description",DbType.String, product_desc);
107 dbCmdWrapper.AddInParameter("@bqaction",DbType.String, bqAction);
108 dbCmdWrapper.AddInParameter("@creditamount",DbType.Currency, 0);
109 dbCmdWrapper.AddInParameter("@processor",DbType.String, whichProcessor);
110 returnedbqISN = 0;
111 returnedbqISN = (Int32)db.ExecuteScalar(dbCmdWrapper) ;
112
113 }
114
115
116
117 //bill credit card or ACH
118 switch (ccORach.Trim())
119 {
120 case "CC":
121 retBilling = BillCreditCard(whichProcessor,ip,merchant_email,grand_total, strFirstName.Trim(), strLastName.Trim(),
122 city,state, phone, address1,address2, zip, customer_email,
123 product_desc, socialsecuritynum,creditcardnumber, cardverifynum, cardexpiredate,returnedbqISN,
124 ref AuthCode, ref OrderNumber, ref DeclineCode, ref TermCode, ref ErrorMessage, ref ProcessorResponse,
125 authenticationValue,authenticationTransactionID, eci, transactiontype, PAResStatus, SignatureVerification);
126 break;
127 case "ACH":
128 retBilling = BillACH(whichProcessor, ip,merchant_email, grand_total, firstname, lastname,
129 city,state, phone, address1,address2, zip, customer_email,
130 product_desc, socialsecuritynum,bankname, routingnumber, accountnumber, checknumber, returnedbqISN,
131 ref AuthCode, ref OrderNumber, ref DeclineCode, ref TermCode, ref ErrorMessage, ref ProcessorResponse);
132 break;
133 case "PAYPAL":
134 retBilling = BillPayPal(ip,merchant_email,grand_total,firstname,lastname,
135 city,state,phone,address1,address2,zip,customer_email,
136 product_desc,socialsecuritynum,returnedbqISN, paypalSubAgreeID, notificationLocation,
137 ref strErrorNo, ref strErrorDesc, ref strTransactionId, ref strStatus,
138 ref strStatusCode, ref strReasonCode);
139 break;
140 }
141
142 //insert into billingDetail
143 char bqRecurring = 'N';
144 sql = "spInsertBillingDetail2";
145 dbCmdWrapper = db.GetStoredProcCommandWrapper(sql);
146
147 dbCmdWrapper.AddInParameter("@mISN",DbType.Int32,mISN);
148 dbCmdWrapper.AddInParameter("@bqISN",DbType.Int32,returnedbqISN);
149 dbCmdWrapper.AddInParameter("@bdamountcollected",DbType.Currency,grand_total);
150 dbCmdWrapper.AddInParameter("@bdtransactioncode",DbType.String,AuthCode);
151 dbCmdWrapper.AddInParameter("@bdstatus",DbType.Boolean,retBilling);
152 dbCmdWrapper.AddInParameter("@bdauthcode",DbType.String,AuthCode);
153 dbCmdWrapper.AddInParameter("@bdordernumber",DbType.String,OrderNumber);
154 dbCmdWrapper.AddInParameter("@bdtracecode",DbType.String,returnedbqISN);
155 dbCmdWrapper.AddInParameter("@email",DbType.String,customer_email);
156 dbCmdWrapper.AddInParameter("@bankname",DbType.String,bankname);
157 dbCmdWrapper.AddInParameter("@routingnumber",DbType.String,routingnumber);
158 dbCmdWrapper.AddInParameter("@accountnumber",DbType.String,enc_accountnumber);
159 dbCmdWrapper.AddInParameter("@checknumber",DbType.String,checknumber);
160 dbCmdWrapper.AddInParameter("@nameoncard",DbType.String,nameoncard);
161 dbCmdWrapper.AddInParameter("@cardnumber",DbType.String,enc_cardnumber);
162 dbCmdWrapper.AddInParameter("@cardverifynum",DbType.Int32,cardverifynum);
163 dbCmdWrapper.AddInParameter("@cardexpirationdate",DbType.DateTime,cardexpiredate);
164 dbCmdWrapper.AddInParameter("@billaddress1",DbType.String,address1);
165 dbCmdWrapper.AddInParameter("@billaddress2",DbType.String,address2);
166 dbCmdWrapper.AddInParameter("@billcity",DbType.String,city);
167 dbCmdWrapper.AddInParameter("@billstate",DbType.String,state);
168 dbCmdWrapper.AddInParameter("@billzip",DbType.String,zip);
169 dbCmdWrapper.AddInParameter("@billphone",DbType.String, phone);
170 dbCmdWrapper.AddInParameter("@ip",DbType.String, ip);
171 dbCmdWrapper.AddInParameter("@bqrecurring",DbType.String, bqRecurring);
172 dbCmdWrapper.AddInParameter("@Message",DbType.String, ErrorMessage);
173 dbCmdWrapper.AddInParameter("@ProcessorResponse",DbType.String, ProcessorResponse);
174 dbCmdWrapper.AddInParameter("@processor",DbType.String, whichProcessor);
175
176 dbCmdWrapper.AddInParameter("@strErrorNo",DbType.String, strErrorNo);
177 dbCmdWrapper.AddInParameter("@strErrorDesc",DbType.String, strErrorDesc);
178 dbCmdWrapper.AddInParameter("@strTransactionId",DbType.String, strTransactionId);
179 dbCmdWrapper.AddInParameter("@strStatus",DbType.String, strStatus);
180 dbCmdWrapper.AddInParameter("@strStatusCode",DbType.String, strStatusCode);
181 dbCmdWrapper.AddInParameter("@strReasonCode",DbType.String, strReasonCode);
182
183
184 Int32 returnedbdISN = 0;
185 returnedbdISN = (Int32)db.ExecuteScalar(dbCmdWrapper) ;
186 if (retBilling)
187 {
188 if (UpdateBillingQStatuses(strDBInstance,returnedbqISN,'S'))
189 {
190 return true;
191 }
192 }
193 else
194 {
195 if (UpdateBillingQStatuses(strDBInstance,returnedbqISN,'F'))
196 {
197 return false;
198 }
199 }
200 return false;
201
202 }

 
 
 

View 2 Replies View Related

ADO Stored Procedure Parameter Error With DB2

Jul 1, 2007

Hey all,



I ran into a little snag when writing a VBScript app for work that parses a text file and places that data into a DB2 V8.1 database via OLE DB ADO calls and a stored procedure with parameters.

I have found that I can call a stored procedure w/o parameters but as soon as I one that takes some I get the following error.




"arguments are of the wrong type, are out of acceptable range"


To try to troubleshoot it, I tried applying each parameter property individually. I noticed that when I didn't provide a direction, I received a different error (Don't have the exact one but it had something to do with an IBM OLE DB property error).

Because the VBScript error was on the line (mycmd.commandtype = adCmdStoredProc) I replaced the global constant with a literal (IE: 4). No fix.

I'm going to try to replace all of the global constants with their literal values but I also found this on the IBM site...


1: SQLProcedureColumns is used by many applications to
determine the direction of stored procedure parameters. The
ODBC driver is returning an ordinal of 1 for all the
parameters.
This causes problems with applications that use this
information. For example a stored procedure call using
Microsoft ActiveX Data Objects (ADO) and the adCmdStoredProc
syntax will return one of the following error messages:
3265 Item cannot be found in the collection corresponding to the
requested name or ordinal.
3001 Arguments are of the wrong type, are out of acceptable
range, or are in conflict with one another.
SQLProcedureColumns is also returning a "BUFFER_LENGTH" value
for numeric data types that is 1 byte too large. The default C
data type is character so this value should be display size
-without an extra byte for null.


I'm guessing this is the solution to my issue but I figured I'd put this out there just in case I was missing something.

If you have any other suggestions, please chime in.

View 5 Replies View Related

Error On Passing Parameter To Stored Procedure

Jul 1, 2004

Hi,

I have a procedure that will save to table in sql server 200 via stored procedure. When I hit the save button it alwasy give me an error saying "Procedure 'sp_AddBoard' expects parameter '@dtmWarrantyStart', which was not supplied" even though I supplied it in the code

which is

Dim ParamdtmWarrantyStart As SqlParameter = New SqlParameter("@dtmWarrantyStart", SqlDbType.datetime, 8)
ParamdtmWarrantyStart.Value = dtmWarrantyStart
myCommand.Parameters.Add(ParamdtmWarrantyStart)

below is the stored procedure.

create Proc sp_AddBoard(@BrandID int,
@strPcName varchar(50),
@bitAccounted bit,
@dtmAccounted datetime,
@dtmWarrantyStart datetime,
@dtmWarrantyEnd datetime,
-- @strDescription varchar(500),
@intStatus int,
@ModelNo varchar(50),
@intMemorySlots int,
@intMemSlotTaken int,
@intAgpSlots int,
@intPCI int,
@bitWSound bit,
@bitWLan bit,
@bitWVideo bit,
@dtmAcquired datetime,
@stat bit output,
@intFSB int) as
if not exists(select strPcName from tblBoards where strPcName=@strPcName)
begin
insert into tblBoards
(BrandID, strPcName, bitAccounted,
dtmAccounted, dtmWarrantyStart,
dtmWarrantyEnd, --strDescription,
intStatus,
ModelNo, intMemorySlots, intMemSlotTaken,
intAgpSlots, intPCI, bitWLan,
bitWVideo, dtmAcquired,intFSB,bitWSound)

values

(@BrandID,@strPcName,@bitAccounted,
@dtmAccounted,@dtmWarrantyStart,
@dtmWarrantyEnd,--@strDescription,
@intStatus,
@ModelNo,@intMemorySlots,@intMemSlotTaken,
@intAgpSlots,@intPCI,@bitWLan,
@bitWVideo,@dtmAcquired,@intFSB,@bitWSound)
end
else
begin
set @stat=1
end

The table is also designed to accept nulls on that field but still same error occured.

Please help

View 1 Replies View Related

Stored Procedure Output Parameter Error

Sep 18, 2014

Stored procedure displays the follwing error.

Procedure or function 'getFavoriteList' expects parameter '@category_name', which was not supplied.

I have code

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[getFavoriteList]
@customer_id int,
@category_name varchar(200) OUTPUT

[Code] ....

View 6 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved