Main Page | Report this Page
.NET DotNet Forum Index  »  ASP.NET Forum  »  Insert using sp error...
Page 1 of 1    

Insert using sp error...

Author Message
David C...
Posted: Sun Nov 01, 2009 1:27 pm
Guest
I am getting an error "Procedure or function mc_insActivityHistory has too
many arguements specified." I cannot see the problem. Below is the
DataSource info. and below that is the actual sp.

InsertCommand="mc_insActivityHistory"

<InsertParameters>
<asp:QueryStringParameter Name="PeopleLinkID"
QueryStringField="plid" Type="Int32" />
<asp:Parameter Name="ActivityCode" Type="Int16" />
<asp:Parameter Name="ActivityDate" Type="DateTime" />
<asp:Parameter Name="EnteredBy" Type="Int32" />
<asp:Parameter Name="ActivityNotes" Type="String" />
</InsertParameters>

ALTER PROCEDURE [dbo].[mc_insActivityHistory]
at (no spam) PeopleLinkID int,
at (no spam) ActivityCode smallint,
at (no spam) ActivityDate datetime,
at (no spam) EnteredBy int,
at (no spam) ActivityNotes nvarchar(MAX)
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;

INSERT INTO [MCFICore].[dbo].[ActivityHistory]
([PeopleLinkID]
,[ActivityCode]
,[ActivityDate]
,[EnteredBy]
,[ActivityNotes])
VALUES
( at (no spam) PeoplelinkID,
at (no spam) ActivityCode,
at (no spam) ActivityDate,
at (no spam) EnteredBy,
at (no spam) ActivityNotes);

END


Thanks.
-David
 
Scott M....
Posted: Sun Nov 01, 2009 1:54 pm
Guest
"David C" <dlchase at (no spam) lifetimeinc.com> wrote in message
news:e2DbtEyWKHA.3720 at (no spam) TK2MSFTNGP02.phx.gbl...
Quote:
I am getting an error "Procedure or function mc_insActivityHistory has too
many arguements specified." I cannot see the problem. Below is the
DataSource info. and below that is the actual sp.

InsertCommand="mc_insActivityHistory"

InsertParameters
asp:QueryStringParameter Name="PeopleLinkID"
QueryStringField="plid" Type="Int32" /
asp:Parameter Name="ActivityCode" Type="Int16" /
asp:Parameter Name="ActivityDate" Type="DateTime" /
asp:Parameter Name="EnteredBy" Type="Int32" /
asp:Parameter Name="ActivityNotes" Type="String" /
/InsertParameters

ALTER PROCEDURE [dbo].[mc_insActivityHistory]
at (no spam) PeopleLinkID int,
at (no spam) ActivityCode smallint,
at (no spam) ActivityDate datetime,
at (no spam) EnteredBy int,
at (no spam) ActivityNotes nvarchar(MAX)
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;

INSERT INTO [MCFICore].[dbo].[ActivityHistory]
([PeopleLinkID]
,[ActivityCode]
,[ActivityDate]
,[EnteredBy]
,[ActivityNotes])
VALUES
( at (no spam) PeoplelinkID,
at (no spam) ActivityCode,
at (no spam) ActivityDate,
at (no spam) EnteredBy,
at (no spam) ActivityNotes);

END


Thanks.
-David

Does this table automatically create a unique ID as the primary key for the
data? If so, you shouldn't be passing it to the insert command, you should
just let the database create that field for you.

-Scott
 
David C...
Posted: Sun Nov 01, 2009 2:32 pm
Guest
"Scott M." <s-mar at (no spam) nospam.nospam> wrote in message
news:uIfg6RyWKHA.408 at (no spam) TK2MSFTNGP04.phx.gbl...
Quote:

"David C" <dlchase at (no spam) lifetimeinc.com> wrote in message
news:e2DbtEyWKHA.3720 at (no spam) TK2MSFTNGP02.phx.gbl...
I am getting an error "Procedure or function mc_insActivityHistory has too
many arguements specified." I cannot see the problem. Below is the
DataSource info. and below that is the actual sp.

InsertCommand="mc_insActivityHistory"

InsertParameters
asp:QueryStringParameter Name="PeopleLinkID"
QueryStringField="plid" Type="Int32" /
asp:Parameter Name="ActivityCode" Type="Int16" /
asp:Parameter Name="ActivityDate" Type="DateTime" /
asp:Parameter Name="EnteredBy" Type="Int32" /
asp:Parameter Name="ActivityNotes" Type="String" /
/InsertParameters

ALTER PROCEDURE [dbo].[mc_insActivityHistory]
at (no spam) PeopleLinkID int,
at (no spam) ActivityCode smallint,
at (no spam) ActivityDate datetime,
at (no spam) EnteredBy int,
at (no spam) ActivityNotes nvarchar(MAX)
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;

INSERT INTO [MCFICore].[dbo].[ActivityHistory]
([PeopleLinkID]
,[ActivityCode]
,[ActivityDate]
,[EnteredBy]
,[ActivityNotes])
VALUES
( at (no spam) PeoplelinkID,
at (no spam) ActivityCode,
at (no spam) ActivityDate,
at (no spam) EnteredBy,
at (no spam) ActivityNotes);

END


Thanks.
-David

Does this table automatically create a unique ID as the primary key for
the data? If so, you shouldn't be passing it to the insert command, you
should just let the database create that field for you.

-Scott

Yes it does. It is named ActivityID and is not sent as a parameter.


David
 
 
Page 1 of 1    
All times are GMT - 5 Hours
The time now is Tue Dec 08, 2009 9:07 am