C# 如何将breakeline保存在数据库中并在textarea winform c中显示#
我在数据库中保存了一个长字符串,我不想在winForm的文本区域中显示它 但是我没有得到我想要的结果 守则:C# 如何将breakeline保存在数据库中并在textarea winform c中显示#,c#,sql,sql-server,winforms,C#,Sql,Sql Server,Winforms,我在数据库中保存了一个长字符串,我不想在winForm的文本区域中显示它 但是我没有得到我想要的结果 守则: insert into table ( Description ) 'ערך אחד: ' + convert(NVARCHAR, t1.MonthlyReturnAmount) +'\r\n'+ ' ערך שני: ' + convert(NVARCHAR, t1.LastPaymentDate) +'\r\n'+ ' ערך שלישי: ' + case WHEN t2.IsA
insert into table
(
Description
)
'ערך אחד: ' + convert(NVARCHAR, t1.MonthlyReturnAmount) +'\r\n'+
' ערך שני: ' + convert(NVARCHAR, t1.LastPaymentDate) +'\r\n'+
' ערך שלישי: ' + case WHEN t2.IsActive=0 then 'לא' else 'כן' END
from table1 t1
join table2 t2 on t1.id=t2.filed
在数据库中:
在文本区域:
它不是特征线,为什么???假设这是针对SQL Server的,您可以使用该函数获取字符编号13(回车符)和10(新行)
insert into table
(
Description
)
'ערך אחד: ' + convert(NVARCHAR, t1.MonthlyReturnAmount) + nchar(13) + nchar(10) +
' ערך שני: ' + convert(NVARCHAR, t1.LastPaymentDate) + nchar(13) + nchar(10) +
' ערך שלישי: ' + case WHEN t2.IsActive=0 then 'לא' else 'כן' END
from table1 t1
join table2 t2 on t1.id=t2.filed
假设这是针对SQL Server的,您可以使用该函数获取字符编号13(回车符)和10(新行)
insert into table
(
Description
)
'ערך אחד: ' + convert(NVARCHAR, t1.MonthlyReturnAmount) + nchar(13) + nchar(10) +
' ערך שני: ' + convert(NVARCHAR, t1.LastPaymentDate) + nchar(13) + nchar(10) +
' ערך שלישי: ' + case WHEN t2.IsActive=0 then 'לא' else 'כן' END
from table1 t1
join table2 t2 on t1.id=t2.filed
因为它们不是这样呈现的
将代码中的
\r\n
替换为环境。换行符
,因为它们不是这样呈现的
将代码中的
\r\n
替换为环境。换行符
发布代码而不是图像。它确实有换行符。不过,您并没有渲染它们。请发布代码而不是图像。它确实有换行符。但是,您没有渲染它们。什么是\b
?我怎么知道呢?@Ayal:\b
是8。什么是\b
?我怎么知道呢?@Ayal:\b
是8。