CREATE trigger Navigation_update
on Navigation
for update
AS
BEGIN
update Navigation set [path] =
case
when NavFId=0 then '/'
else (select [path] from Navigation where id = Inserted.NavFId) + NavFId + '/'
end
where Id=Inserted.Id;
END
GO
改成new.Id 也是一样无法绑定由多个部分组成的标识符 "new.Id "
群里的朋友帮解决了。
ALTER TRIGGER [dbo].[Navigation_update]
ON [dbo].[Navigation]
AFTER UPDATE
AS
begin
update Navigation set [path]=
(select path from Navigation where id =(select NavFId from Inserted))+ convert(varchar,NavFId) +'/'
where Navigation.id=(select id from Inserted)
end
无法绑定由多个部分组成的标识符 "Inserted.Id"
答案:1 悬赏:0 手机版
解决时间 2021-01-23 14:29
- 提问者网友:别再叽里呱啦
- 2021-01-23 07:20
最佳答案
- 五星知识达人网友:掌灯师
- 2021-01-23 08:56
如果是数字:
string sql1 = "select proname,promodel,prospec,producer,unitprice,danwei,prodesc from jichuang where [promodel]="+txtmodel.Text;
如果是字符串:
string sql1 = "select proname,promodel,prospec,producer,unitprice,danwei,prodesc from jichuang where [promodel]='"+txtmodel.Text+"'";
另外,这样拼接查询字符串,得考虑到sql 注入的风险
string sql1 = "select proname,promodel,prospec,producer,unitprice,danwei,prodesc from jichuang where [promodel]="+txtmodel.Text;
如果是字符串:
string sql1 = "select proname,promodel,prospec,producer,unitprice,danwei,prodesc from jichuang where [promodel]='"+txtmodel.Text+"'";
另外,这样拼接查询字符串,得考虑到sql 注入的风险
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯
正方形一边上任一点到这个正方形两条对角线的 |
阴历怎么看 ? |