我试图在文本框中显示两个不同表格中的两个值与一个特定机构的关系。将两个不同列中的两个值显示为一个文本框
我写的代码没有显示“advisor_name”,只显示“Influence_weight_name”。我也希望这两个名称都显示在一行上,所以最终产品应该看起来像这样:顾问名称 - 重量名称
任何人都可以帮忙吗?
下面是我的代码:
Dim totalRecords As Integer = sqlTableInstitution.Rows.Count
Dim advisorText As String = ""
Dim weightText As String = ""
If IsDBNull(sqlTableInstitution.Rows(0)("advisor_name")) <> True Then
advisorText = sqlTableInstitution.Rows(0)("advisor_name")
End If
If IsDBNull(sqlTableInstitution.Rows(0)("Influence_weight_name")) <> True Then
weightText = weightText & "-" & sqlTableInstitution.Rows(0)("Influence_weight_name")
End If
Textbox1.text = advisorText
Textbox1.text = weightText
它完美!谢谢! – AznDevil92