如何在常量错误中解决换行符 [英] How to resolve newline in constant error

查看:119
本文介绍了如何在常量错误中解决换行符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何解决此错误。我曾尝试使用此链接但无法正常工作。



https://stackoverflow.com/questions/17739612/new-line-in -constant-error



我尝试过:



How can i resolve this error. I had tried using this link but not working.

https://stackoverflow.com/questions/17739612/new-line-in-constant-error

What I have tried:

dtListBox = dLib.GetDataTable("declere @test table(SLNControl int,ControlOrderBy int) insert into @test values(" + stringData + ")update UIF_ControlProperties set SLNControl= tb.slnControl from @test tb.join UIF_ControlProperties cp on tb.slnControl = sp.SLNControl);

推荐答案

看起来你错过了一个闭幕sql命令末尾的双引号。



你可能需要这个



It looks like you are missing a closing double quote at the end of the sql command.

You probably need this

dtListBox = dLib.GetDataTable("declere @test table(SLNControl int,ControlOrderBy int) insert into @test values(" + stringData + ")update UIF_ControlProperties set SLNControl= tb.slnControl from @test tb.join UIF_ControlProperties cp on tb.slnControl = sp.SLNControl");


看一下你的陈述:

Take a look at your statement:
"declere @test table(SLNControl int,ControlOrderBy int) insert into @test values(" + stringData + ")update UIF_ControlProperties set SLNControl= tb.slnControl from @test tb.join UIF_ControlProperties cp on tb.slnControl = sp.SLNControl);



有几个错误:





















< tr>
错误 纠正
1。错误的语法:


There's several mistakes:










WrongCorrect
1. wrong syntax:

decl e re

decl a re

2。括号和更新语句

2. missing space between bracket and update statement

更新

更新

3。错误的别名!

3. wrong alias!

来自@test tb.join UIF_ControlProperties cp 关于tb.slnControl = sp .SLNControl
"from @test tb.join UIF_ControlProperties cp on tb.slnControl = sp.SLNControl"

来自@test tb.join UIF_ControlProperties cp 关于tb.slnControl = cp .SLNControl
"from @test tb.join UIF_ControlProperties cp on tb.slnControl = cp.SLNControl"

4。声明末尾缺少双引号!

4. missing double quote at the end of statement!

(声明...... SLNControl;
("declare ... SLNControl);

(声明... SLNControl);
("declare ... SLNControl");





但是,更糟糕的是,当您的命令用于修改数据而不是选择它们时,您尝试获取数据!


这篇关于如何在常量错误中解决换行符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆