Basit Khan

Basit Khan

  • NA
  • 336
  • 121.6k

Send SMS in SQL through trigger

Aug 19 2015 12:24 AM
Dear,
I have created a trigger for sending sms through SQL, But how to put httpget in SQL please help me on this.
Below is the trigger. Note that java script code working fine.
alter TRIGGER CallInserted
ON [dbo].[CustomerCall]
FOR INSERT
AS
BEGIN
SET NOCOUNT ON;
IF EXISTS (SELECT * FROM inserted)
BEGIN
//below is javascript code working fine, But i want to use in SQL
function httpGet(theUrl)
{
var xmlHttp = new XMLHttpRequest();
xmlHttp.open( "GET", theUrl, false ); // false for synchronous request
xmlHttp.send( null );
return xmlHttp.responseText;
}
END
END
GO
Thanks
Basit.

Answers (2)