我在VB.NET中创建了一个ReportDataSource,当我在调试模式下查看其列时,我注意到它的列太多了。我重命名了六列(从“ 1”重命名为“ ID1”,依此类推),但它添加了六列,而不是重命名旧列。
使用以下代码填充ReportDataSource:
Private Function MarkdownPicturesDT(refDate As Date, intStoreNumber As Integer, intMarkdownID As Integer, intABS As Integer, intRptType As Integer) As DataSet_SA.MDPASDataTable
Dim dt As New DataSet_SA.MDPASDataTable
Using MarkdownSQLConn As New SqlConnection(mSACube_AltardState_ConnectionString)
MarkdownSQLConn.Open()
Dim cmd = New SqlCommand
cmd.Connection = MarkdownSQLConn
cmd.CommandType = CommandType.StoredProcedure
cmd.CommandText = "Rpt_MarkdownPictures"
cmd.Parameters.Add("@refDate", SqlDbType.Date).Value = refDate
cmd.Parameters.Add("@intStoreNumber", SqlDbType.Int).Value = intStoreNumber
cmd.Parameters.Add("@intMarkdownID", SqlDbType.Int).Value = intMarkdownID
cmd.Parameters.Add("@intABS", SqlDbType.Int).Value = intABS
cmd.Parameters.Add("@intRptType", SqlDbType.Int).Value = intRptType
Dim reader = cmd.ExecuteReader
dt.Load(reader)
End Using
Return dt
End Function
我的问题的屏幕截图: https://i.imgur.com/cIn6U6c.png
Here's the defininition for my XSD
可以让我知道这里发生了什么吗?或如何解决?我不想用红色突出显示这些列。