hi i dont know how, but i have seen this type of use. whenever i send e-greeting through Santabanta.com, there i check a option which enable me to know when recipients opened the e-greeting. there must be some way to do that.
vineet13780
Posts
-
tracing email -
Sending Http Post Request from Stored ProcedureHi, i am new to SQL-Server and Web Technology. i have just joined a company and its my first task to do. So, Please Help me immediately. I have to send a Http Post Request to a server with 4 parameters from a Stored Procedure. I got a Stored procedure on google which use Http post method from Stored Procedure. but i dont know how to send Parameters alongwith it on server and how to get back the status message(e.g. error message if failed). the stored procedure is: **************************************************************************** CREATE procedure HTTP_POST( @sUrl varchar(200), @response varchar(8000) out) As Declare @obj int ,@hr int ,@status int ,@msg varchar(255) exec @hr = sp_OACreate 'MSXML2.ServerXMLHttp.3.0', @obj OUT if @hr <> 0 begin Raiserror('sp_OACreate MSXML2.ServerXMLHttp.3.0 failed', 16,1) return end exec @hr = sp_OAMethod @obj, 'open', NULL, 'POST', @sUrl, false if @hr <>0 begin set @msg = 'sp_OAMethod Open failed' goto eh end exec @hr = sp_OAMethod @obj, 'setRequestHeader', NULL, 'Content-Type', 'application/x-www-form-urlencoded' if @hr <>0 begin set @msg = 'sp_OAMethod setRequestHeader failed' goto eh end exec @hr = sp_OAMethod @obj, 'send', NULL, 'Var1=Test1&Var2=Test2' if @hr <>0 begin set @msg = 'sp_OAMethod Send failed' goto eh end exec @hr = sp_OAGetProperty @obj, 'status', @status OUT if @hr <>0 begin set @msg = 'sp_OAMethod read status failed' goto eh end if @status <> 200 begin set @msg = 'sp_OAMethod http status ' + str(@status) goto eh end exec @hr = sp_OAGetProperty @obj, 'responseText', @response OUT if @hr <>0 begin set @msg = 'sp_OAMethod read response failed' goto eh end exec @hr = sp_OADestroy @obj return eh: exec @hr = sp_OADestroy @obj Raiserror(@msg, 16, 1) return GO **************************************************************************** the parameters which i have to send are: variable name ----- Parameter value ------------------------------------------------------------ name -> any character String msisdn -> any numeric string (Like Mobile No.) toAddress -> any numeric string (Like Mobile No.) message -> any character string (Like SMS Message) ------------------------------------------------------------- Actually i have to send these information on a server which will send SMS to any mobile. so, plz can any one help me