0

我有一个简单的存储过程INSERT,最近我注意到我遇到了不寻常的错误,一个似乎不像

当我尝试编译以下存储过程时出现以下错误:

消息 137,级别 15,状态 2,过程 usp_AddArticleCategory,第 15 行
必须声明标量变量“@ArtcileCategoryActive”。

这是我的代码:

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- =============================================
CREATE PROCEDURE [dbo].[usp_AddArticleCategory]
    @ArticleCategoryName nvarchar(200),
    @LangID int,
    @ArticleCategoryActive bit,
    @Type nvarchar(100)
AS
    SET NOCOUNT ON;
BEGIN
    INSERT INTO art_Category (ArticleCategoryName,[LangID],ArtcileCategoryActive,[Type])
         VALUES (@ArticleCategoryName, @LangID, @ArtcileCategoryActive, @Type)
END

表结构:

CREATE TABLE [dbo].[art_Category](
    [ArticleCategoryID] [int] IDENTITY(1,1) NOT NULL,
    [ArticleCategoryName] [nvarchar](200) NULL,
    [LangID] [int] NULL,
    [ArtcileCategoryActive] [bit] NULL,
    [Type] [nvarchar](100) NULL,
 CONSTRAINT [PK_art_Category] PRIMARY KEY CLUSTERED 
(
    [ArticleCategoryID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

我比较了表列、数据类型,但我不确定为什么这个错误不断出现。

感谢您对此的帮助

4

1 回答 1

3

你在声明;

ArticleCategoryActive

和使用;

ArtcileCategoryActive

指出不同?:)

于 2012-11-11T11:44:52.593 回答