你好,所以我必須在vb.net一個DropDownBox這是場類型:的Varchar在MS SQL Server 2012中,並顯示如下:LINQ返回值從字符串轉換未能詮釋
1 - Info
10.1 - Testing
10.2 - Programs
2 - Modes
3 - Qualifications
....
但它顯示了在錯誤的順序。這是我的代碼:
Public Shared Function GetLineCodeList() As IEnumerable
Dim _Result As IEnumerable
_Result = (From lc As SLBLINECODE In DataManager.SlbContext.SLBLINECODES
Where lc.HIDDEN = 0
Order By lc.LINECODE
Select New With {
.LINECODE = lc.LINECODE,
.LINEDESCRIPTION = lc.LINECODE + " - " + lc.LINEDESCRIPTION
}).ToList()
Return _Result
End Function
所以我一直在努力做一個排序CINT(lc.LINECODE) 因爲我知道甲骨文工作正常,但在T-SQL不具有相同的行爲。任何建議?
什麼是'LINECODE'列的數據庫類型? – Fabio