@ContractStateC ode, @ContactZipCode @BillingStateCo de, @BillingZipCode show "not a parameter for procedure SelectDonorXiD" .
The Results show the selected data but the parameters are all null.
My C# ocde -
gives - "String[1]: the Size property has an invalid size of 0."
I understand that something is wrong with my stored procedure but for the life of me I cannot see what.
Please help?
The Results show the selected data but the parameters are all null.
My C# ocde -
Code:
DataView dvSql = (DataView)sdsEditDonor.Select(DataSourceSelectArguments.Empty);
I understand that something is wrong with my stored procedure but for the life of me I cannot see what.
Please help?
Code:
Table ------
USE [char68003f]
GO
/****** Object: Table [dbo].[GFA_Donors] Script Date: 09/01/2010 19:44:37 ******/
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[GFA_Donors]') AND type in (N'U'))
DROP TABLE [dbo].[GFA_Donors]
GO
USE [char68003f]
GO
/****** Object: Table [dbo].[GFA_Donors] Script Date: 09/01/2010 19:44:38 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[GFA_Donors](
[DonorID] [int] IDENTITY(1,1) NOT NULL,
[ContactTitle] [varchar](7) NULL,
[ContactFirstName] [varchar](40) NULL,
[ContactLastName] [varchar](40) NULL,
[ContactAddress1] [varchar](40) NULL,
[ContactAddress2] [varchar](40) NULL,
[ContactCity] [varchar](30) NULL,
[ContactStateCode] [varchar](2) NULL,
[ContactZipCode] [varchar](10) NULL,
[ContactPhone] [varchar](30) NULL,
[ContactEmail] [varchar](80) NULL,
[BillingTitle] [varchar](7) NULL,
[BillingFirstName] [varchar](40) NULL,
[BillingLastName] [varchar](40) NULL,
[BillingAddress1] [varchar](40) NULL,
[BillingAddress2] [varchar](40) NULL,
[BillingCity] [varchar](30) NULL,
[BillingStateCode] [varchar](2) NULL,
[BillingZipCode] [varchar](10) NULL,
[BillingPhone] [varchar](30) NULL,
[BillingEmail] [varchar](80) NULL,
[BillStartDate] [smalldatetime] NOT NULL,
[CCExpire] [varchar](7) NOT NULL,
[CreditCardNo] [varchar](16) NOT NULL,
[DonationAmount] [money] NULL,
[DonationPreference] [varchar](10) NULL,
[PrivacyPreference] [varchar](20) NULL,
[DesignationCause] [varchar](50) NULL,
[GiftOrDedication] [varchar](50) NULL,
[SubscriptionID] [int] NULL,
[Comment] [varchar](255) NULL,
[BlockMailings] [bit] NULL,
[NewsLetter] [bit] NULL,
[DateAdded] [datetime] default getdate(),
[DateUpdated] [datetime] default getdate()
,
[anonymous] [bit] NULL,
[Active] [bit] NULL,
CONSTRAINT [PK__persons__09DE7BCC] PRIMARY KEY CLUSTERED
(
[DonorID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
ALTER TABLE [dbo].[GFA_Donors] ADD CONSTRAINT [DF_GFA_Donors_BillingStartDate] DEFAULT (((7)/(13))/(1944)) FOR [BillStartDate]
GO
ALTER TABLE [dbo].[GFA_Donors] ADD CONSTRAINT [DF_GFA_Donors_CCExipre] DEFAULT ((7)/(1944)) FOR [CCExpire]
GO
ALTER TABLE [dbo].[GFA_Donors] ADD CONSTRAINT [DF_GFA_Donors_CreditCardNo] DEFAULT ('xxxxxxxxxxxx5555') FOR [CreditCardNo]
GO
ALTER TABLE [dbo].[GFA_Donors] ADD CONSTRAINT [DF_GFA_Donors_Active] DEFAULT ((1)) FOR [Active]
GO
Stored PROC---------------
USE [char68003f]
GO
/****** Object: StoredProcedure [dbo].[SelectDonorXiD] SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[SelectDonorXiD]
(
@DonorID varchar(50) ,
@ContactTitle varchar(7)=null OUTPUT,
@ContactFirstName varchar(40)=null OUTPUT,
@ContactLastName varchar(40)=null OUTPUT,
@ContactAddress1 varchar(40)=null OUTPUT,
@ContactAddress2 varchar(40)=null OUTPUT,
@ContactCity varchar(30)=null OUTPUT,
@ContactStateCode varchar(2)=null OUTPUT,
@ContactZipCode varchar(10)=null OUTPUT,
@ContactPhone varchar(30)=null OUTPUT,
@ContactEmail varchar(80)=null OUTPUT,
@BillingTitle varchar(7)=null OUTPUT,
@BillingFirstName varchar(40)=null OUTPUT,
@BillingLastName varchar(40)=null OUTPUT,
@BillingAddress1 varchar(40)=null OUTPUT,
@BillingAddress2 varchar(40)=null OUTPUT,
@BillingCity varchar(30)=null OUTPUT,
@BillingStateCode varchar(2)=null OUTPUT,
@BillingZipCode varchar(10)=null OUTPUT,
@BillingPhone varchar(30)=null OUTPUT,
@BillingEmail varchar(80)=null OUTPUT
)
AS
Select ContactTitle, ContactFirstName, ContactLastName, ContactAddress1, ContactAddress2, ContactCity, ContactStateCode, ContactEmail, ContactPhone, ContactZipCode,BillingTitle,BillingFirstName,BillingLastName, BillingAddress1, BillingAddress2,BillingCity,BillingStateCode, BillingEmail, BillingPhone, BillingZipCode
From GFA_Donors Where @DonorID = DonorID
RETURN
Comment