I am very new to VB.net.
In the following code I am trying to implement tuples. You'll notice in the SQL clause that I pulled [System Name] and Agency ID and I want them to appear as AgencyID & "-" & [System Name] in a dropdown list. I'm figuring that I will use tuples in lstProfiles in order to create the list. What changes do I need to make in order to make that happen?
Public Function fetchActiveProfiles() As List(Of String)
Dim lstProfiles As New List(Of String)
Dim sqlCmd As String
sqlCmd = ""
sqlCmd = sqlCmd & " select [System Name],AgencyID"
sqlCmd = sqlCmd & " from tblOrgProfile"
sqlCmd = sqlCmd & " Where Active = 1"
sqlCmd = sqlCmd & " order by [System Name]"
Using con As New SqlConnection(GetConnectionString)
Using cmd As New SqlCommand(sqlCmd, con)
cmd.CommandType = CommandType.Text
Using rs As SqlDataReader = cmd.ExecuteReader()
If Not rs.HasRows Then
Catch ex As Exception
Throw New DatabaseConnectionException()