hi,a help needed!
i wanna ask some Qs regarding the datareader?
i have a select statement that select all the email add (for the badge that overdue.)
then i use datareader to read it row by row(it contain 1 column but many row! as below)
how am i going to write it coding.....
abc@yahoo.com
cde@yahoo.com
hjk@hotmail.com
here is the select statement:-
Dim sEmailTo As String = "Select STFMAILID from MP_HRS_CONTACT Where STFNO in (Select STFNO From ESC_APPLICANT Where CDate(APP_VDATE_TO) < # " & DateTime.Now.ToString("dd/MM/yyyy") & "# "
Dim CmdEmailTo As New OleDbCommand(sEmailTo, Conn)
Dim dtrReceiver As OleDbDataReader
here is for the sending email thing:-
how am i get the Receiver from the datareader?
Dim objMail As clsMail = New clsMail
Dim sSendTo As String = ' Receiver ???????? i wanna get it from the datareader
Dim sFrom As String = "abc@yahoo.com"
Dim sCCTo As String
Dim sSubject As String
Dim sBody As String
Dim sAttachment As String
sSubject = "Request Badge has been Reject! "
sBody = "Dear colleague: " + ": "
sBody = sBody + "For more information, please contact IFIC SSE for further information. "
sBody = sBody + " Thank you and have a nice day!"
objMail.SendMail(sFrom, sSendTo, sCCTo, sSubject, sBody, sAttachment)
any ideas provided!
thanks in advance!
regards;
charlotte
i wanna ask some Qs regarding the datareader?
i have a select statement that select all the email add (for the badge that overdue.)
then i use datareader to read it row by row(it contain 1 column but many row! as below)
how am i going to write it coding.....
Email
abc@yahoo.com
cde@yahoo.com
hjk@hotmail.com
here is the select statement:-
Dim sEmailTo As String = "Select STFMAILID from MP_HRS_CONTACT Where STFNO in (Select STFNO From ESC_APPLICANT Where CDate(APP_VDATE_TO) < # " & DateTime.Now.ToString("dd/MM/yyyy") & "# "
Dim CmdEmailTo As New OleDbCommand(sEmailTo, Conn)
Dim dtrReceiver As OleDbDataReader
here is for the sending email thing:-
how am i get the Receiver from the datareader?
Dim objMail As clsMail = New clsMail
Dim sSendTo As String = ' Receiver ???????? i wanna get it from the datareader
Dim sFrom As String = "abc@yahoo.com"
Dim sCCTo As String
Dim sSubject As String
Dim sBody As String
Dim sAttachment As String
sSubject = "Request Badge has been Reject! "
sBody = "Dear colleague: " + ": "
sBody = sBody + "For more information, please contact IFIC SSE for further information. "
sBody = sBody + " Thank you and have a nice day!"
objMail.SendMail(sFrom, sSendTo, sCCTo, sSubject, sBody, sAttachment)
any ideas provided!
thanks in advance!
regards;
charlotte