@ContractStateCode, @ContactZipCode @BillingStateCode, @BillingZipCode show "not a parameter for procedure SelectDonorXiD".
The Results show the selected data but the parameters are all null.
My C# ocde - - DataView dvSql = (DataView)sdsEditDonor.Select(DataSourceSelectArguments.Empty);
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? -
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
5 1473
When are you getting the error?
"String[1]: the Size property has an invalid size of 0."
takes place on DataView dvSql = (DataView)sdsEditDonor.Select(DataSourceSelectArgu ments.Empty);
I went to SQL Management Studio to see if the stored procedure would actually run. In Management Studio I execute the Stored Procedure and get - @ContractStateCode, @ContactZipCode @BillingStateCode, @BillingZipCode show "not a parameter for procedure SelectDonorXiD".
If I can get by the error in Management Studio I think the C# code will work.
Thanks..
I don't know if this is a typo here or in your executing code, but I think you've mislabled a field somewhere in your code.
is not a valid parameter. however
is a parameter.
Resolved but not full understood. I had to give the parameters for the SQLDataSource a lenght attribute? ie @contactstatecode(2)...
mzmishra 390
Recognized Expert Contributor
I think the problem was with your output paramter. you may be setting different datatype to your input parameter in code and storedprocedure.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: D Witherspoon |
last post by:
I have a Structure I have created and am using it as a Public Property of a class. Here is the property.
------------------------------------------------------
Dim _MyID As SInteger
Public...
|
by: bajwa |
last post by:
Hi
Our SQL server has a lot of stored procedures and we want to get some
cleaning up to be done. We want to delete the ones that have been not
run for like 2-3 months. How exactly will i find out...
|
by: Caro |
last post by:
I have a stored procedure spGetAccessLogDynamic and when I try to call
it I get the following error:
Server: Msg 2812, Level 16, State 62, Line 1
Could not find stored procedure 'S'.
I dont...
|
by: Raquel |
last post by:
This is a stored procedure that resides on Mainframe and gets executed on
the client by connecting to the mainframe through DB2 connect. It was
executing fine till yesterday when I executed a table...
|
by: athos |
last post by:
Previously, we could use Visual Studio .Net 2002 combined with Visual
SourceSafe 6.0 to maintain version control for Stored Procedures.
(refer to "How to add SQL Server 2000 Stored Procedures to...
| |
by: singhneeta |
last post by:
Hi all,
I have a funny issue. I have a stored procedure that opens up as a
datasheet. User can use the filter by selection option in Access to
filter records. For some reson, some of the columns...
|
by: Crazy Cat |
last post by:
I'm calling several SQL Server 2005 stored procedures from Visual Basic
2005. I've got one stored procedure that locks up at the same point
everytime, but if I copy the stored procedure from the...
|
by: Sean |
last post by:
When trying to debug using Visual Studio 2005 I get
Unable to start debugging on the web server. An authentication error
occurred while communicating with the web server. Please see Help for...
|
by: %NAME% |
last post by:
I tried to compile a stored procedure on DB2 v7.0 on Solaris.
The procedure is very simple as below:
CREATE PROCEDURE fullamount(OUT fullamnt DOUBLE)
language SQL
READS SQL DATA
BEGIN
...
|
by: subhala |
last post by:
im getting an error when installing visual studio 6 in window xp.here is the error "set up is updating the system".then DCOM user account cannot register c:\program...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |