我正在开发一个针对 .NET Framework CE 的应用程序,我们有很多通过附加数据构建的 SQL 查询。
一个例子
string SQL="insert into ERTLISTS (ERTNUM,ERTTYPE,ERT_Status,ERT_Items,ERTTo_Check," & _
"ERT_Date,ERTe_Date,ERT_ID,Location_Count,TRS_Desc,QA_Cycle," & _
"Due_Date,Next_WRK_Date,User_Freq) values (" & _
"" & CInt(strData(0)) & "," & _
"'" & strData(1) & "'," & _
"'" & strData(2) & "'," & _
"" & CInt(strData(3)) & "," & _
"" & CInt(strData(4)) & "," & _
"#" & CDate((strData(5).Substring(4, 2) & "/" & strData(5).Substring(2, 2) & "/" & strData(5).Substring(0, 2)).ToString()) & "#," & _
"#" & CDate((strData(6).Substring(4, 2) & "/" &
strData(6).Substring(2, 2) &
"/" & strData(6).Substring(0, 2)).ToString()) & "#," & _
"" & CInt(strData(7)) & "," & _
"" & CInt(strData(8)) & "," & _
"'" & strData(9) & "'," & _
"'" & strData(10) & "'," & _
"#" & CDate((strData(11).Substring(4, 2)
& "/" & strData(11).Substring(2, 2) & "/" & strData(11).Substring(0, 2)).ToString()) & "#," & _
"#" & CDate((strData(12).Substring(4, 2)
& "/" & strData(12).Substring(2, 2) & "/" & strData(12).Substring(0, 2)).ToString()) & "#," & _"#" & CDate((strData(13).Substring(4, 2) & "/"
& strData(13).Substring(2, 2) & "/"
& strData(13).Substring(0, 2)).ToString()) & "#)"
我也知道 StringBuilder ,如果我使用 Stringuilder 会有任何性能提升吗?
提前致谢。