Click here to Skip to main content
15,892,161 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
SQL
In my table there is birthdate column, and i want send auto sms on perticular time daily, How can i implement this, Can anyone know??

Thankx in advance.
Posted
Comments
[no name] 6-Jul-15 7:17am    
You use a scheduled task, sql job agent or a windows service.

1 solution

VB


Dim dt As New DataTable
CreateDataTable(dt, "select * from Table where Id = 1")
If (dt.Rows.Count > 0) Then
Dim request As HttpWebRequest
Dim response As HttpWebResponse = Nothing
Dim url As String
Dim senderid As String = dt.Rows(0).Item("SenderId").ToString()
Dim password As String = dt.Rows(0).Item("Password").ToString()
Dim host As String
Dim originator As String = dt.Rows(0).Item("UserName").ToString()
Try
host = "http://smsidea.co.in/sendsms.aspx?"
'originator = "3423434343"
'password = "234hj"
url = host + "mobile=" & HttpUtility.UrlEncode(originator) _
& "&pass=" + HttpUtility.UrlEncode(password) _
& "&senderid=" + HttpUtility.UrlEncode(senderid) _
& "&to=" + HttpUtility.UrlEncode(StrToNumber) _
& "&msg=" + HttpUtility.UrlEncode(StrBody)
request = DirectCast(WebRequest.Create(url), HttpWebRequest)
response = DirectCast(request.GetResponse(), HttpWebResponse)
'MessageBox.Show("Response: " & response.StatusDescription)
Catch ex As Exception
End Try
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900