日期:2014-05-18  浏览次数:20642 次

在VS2008中调试存储过程和触发器,设置断点图标为灰色,不能设置断点?
如题(SQL server 2008)
触发器
SQL code

create trigger mytri on goods after insert,update
as declare @g_id char(20);
   declare @service_id char(20);
   declare @Goods_id char(20);
   declare @B bit =1;
   declare mycur cursor for select Goods_id from goods;
begin
  --insert into supply values(@g_id,@service_id,NULL);
  select @g_id=Goods_id from inserted;
  open mycur;
  fetch next into @Goods_id;
  while @@fetch_status=0
  begin
  if @g_id NOT LIKE @Goods_id
     set @B=0;
     fetch next into @Goods_id;
  --   insert into goods values(@g_id,@service_id,NULL,NULL,NULL,NULL);
  end
  close mycur;
  if @B=0
     insert into goods values(@g_id,@service_id,NULL,NULL,NULL,NULL);
end



存储过程
SQL code

create procedure mypro
as
begin
  insert into supply values('13','2',NULL);
end
commit


请大侠指教

------解决方案--------------------
if @g_id NOT LIKE @Goods_id
这有问题