首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > SQL Server >

Error converting data type varchar to bit.该如何处理

2012-01-29 
Error converting data type varchar to bit.大家帮忙看看哈setANSI_NULLSONsetQUOTED_IDENTIFIERONgo--

Error converting data type varchar to bit.
大家帮忙看看   哈  

set   ANSI_NULLS   ON
set   QUOTED_IDENTIFIER   ON
go


--   =============================================
--   Author: <Author,,Name>
--   Create   date:   <Create   Date,,>
--   Description: <Description,,>
--   =============================================
ALTER   PROCEDURE   [todb].[SPW_Gacha_CouponUpdateUseCoupon]
(
@coupon_code   int,
@is_win   tinyint,
@world_code   tinyint,
@account_gid   varchar(100),
@goods_code   int,
@limit_code   smallint,
        @field_coupon_code   int,
        @drill_coupon_code   int,
        @gacha_item_type   bit,
        @gacha_version   int,
@field_num   int
)
AS
declare   @rvalue   int
exec   @rvalue=TO_ACCOUNT_DB.gmg_account.dbo.uspn_gacha_coupon_update_use_coupon   @coupon_code,@is_win,@world_code,@account_gid,@goods_code,@limit_code,@field_coupon_code,@drill_coupon_code,@gacha_item_type,@field_num,@gacha_version
return   @rvalue

调用时候报错

DECLARE@return_value   int

EXEC@return_value   =   [todb].[SPW_Gacha_CouponUpdateUseCoupon]
@coupon_code   =   100204009,
@is_win   =   2,
@world_code   =   1,
@account_gid   =   N 'n118 ',
@goods_code   =   19502,
@limit_code   =   2,
@field_coupon_code   =   0,
@drill_coupon_code   =   0,
@gacha_item_type   =   0,
@gacha_version   =   1,
@field_num   =   1

SELECT 'Return   Value '   =   @return_value

GO


@gacha_item_type   =   0,这个参数是bit类型的,到底怎么调用   呢   》?


[解决办法]
检查你调用uspn_gacha_coupon_update_use_coupon的参数顺序是否正确
[解决办法]
问题可能出在

exec @rvalue=TO_ACCOUNT_DB.gmg_account.dbo.uspn_gacha_coupon_update_use_coupon @coupon_code,@is_win,@world_code,@account_gid,@goods_code,@limit_code,@field_coupon_code,@drill_coupon_code,@gacha_item_type,@field_num,@gacha_version

热点排行