Dim strEmailAddress As String = ""
Dim dtVolumeOrder As New DataTable()
Dim length As Integer = Convert.ToString(Session("sbEmailAddress")).Split(",").Length
Dim ids As String() = New String(length - 1) {}
For i As Integer = 0 To length - 1
Dim strSelectCommand As String = " SELECT strBadgeName(i) FROM i2Integration_EventRegv45_RegistrationUser where intRegistrationUserID = " + ids[i]
Using sqlConn As New SqlConnection(ConfigurationManager.ConnectionStrings("SiteSqlServer").ConnectionString)
Using adapPatientBills As New SqlDataAdapter(strSelectCommand, sqlConn)
adapPatientBills.Fill(dtVolumeOrder)
End Using
End Using
strEmailAddress = strEmailAddress + strSelectCommand + "," ' build string of email addresses seperated by ','
Next
|