关于CString的简单问题
我在编程中遇到如下一个问题,请高手给看看。谢谢!!!
在程序中定义
CString sSql = "SELECT DISTINCT tQuestionCgy.NameCn,tQuestionCgy.Desp FROM tQuestionCgy"
" INNER JOIN tQcgyVulAreaLink INNER JOIN utVulnerability"
" ON utVulnerability.VCID = tQcgyVulAreaLink.VCID"
" ON tQcgyAreaLink.QCID = tQuestionCgy.QCID"
" WHERE utVulnerability.CaseName='"+pApp->m_sCaseName+"'";
在调试输出窗口中
pApp->m_sCaseName(CString类型)的值为
{"F:\练习\数据库技术\源代码\代码\SecurityWatch\Debug\Case\t3"}
可是在输出窗口中sSql的值却为(请注意最后)
{"SELECT DISTINCT tQuestionCgy.NameCn,tQuestionCgy.Desp FROM tQuestionCgy INNER JOIN
tQcgyVulAreaLink INNER JOIN utVulnerability ON utVulnerability.VCID = tQcgyVulAreaLink.VCID
ON tQcgyAreaLink.QCID = tQuestionCgy.QCID WHERE utVulnerability.CaseName='F:\"
这是为什么?为何相加后会被截断?难道是CString的长度有限制?