In VB6/ADO I used to use the code below to put all the records that did not
have a valid email address into an array which I used later to print mailing
labels. I am not aware of a NET equivalent. What is the right way to
approach this in NET?
Wayne
=============== =============== =============== =
varSentToCount = 0 'Count of recipients
varBookmarkCoun t = 0 'Count or entries with no Email address
myRS2.MoveFirst ()
Do Until myRS2.EOF
If InStr(myRS2!Ema il, "@") > 0 Then 'See if there is an Email address
arySendTo(varSe ntToCount) = Trim(myRS2!Emai l)
varSentToCount = varSentToCount + 1
Else ' No email addr
arytmp(varBookm arkCount) = myRS2.Bookmark
varBookmarkCoun t = varBookmarkCoun t + 1
If varBookmarkCoun t > 248 Then
MsgBox("Too many invalid email addresses to process!", vbOKOnly, "Too many
missing email addresses!")
GoTo ExitEmailSub
End If
End If
myRS2.MoveNext( )
Loop
have a valid email address into an array which I used later to print mailing
labels. I am not aware of a NET equivalent. What is the right way to
approach this in NET?
Wayne
=============== =============== =============== =
varSentToCount = 0 'Count of recipients
varBookmarkCoun t = 0 'Count or entries with no Email address
myRS2.MoveFirst ()
Do Until myRS2.EOF
If InStr(myRS2!Ema il, "@") > 0 Then 'See if there is an Email address
arySendTo(varSe ntToCount) = Trim(myRS2!Emai l)
varSentToCount = varSentToCount + 1
Else ' No email addr
arytmp(varBookm arkCount) = myRS2.Bookmark
varBookmarkCoun t = varBookmarkCoun t + 1
If varBookmarkCoun t > 248 Then
MsgBox("Too many invalid email addresses to process!", vbOKOnly, "Too many
missing email addresses!")
GoTo ExitEmailSub
End If
End If
myRS2.MoveNext( )
Loop
Comment