Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
WoodHouse
Posting Yak Master
211 Posts |
Posted - 2012-07-30 : 19:09:47
|
| Hi Guys,Just want to hit the URL like open & close(SSIS or T-sql).This is dashboard URL..Once I hit the URL and the dashboard data will get refreshed..Please help on it..Thanks a Lot |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
WoodHouse
Posting Yak Master
211 Posts |
Posted - 2012-07-30 : 19:31:47
|
| Thanks tkizer,Please advise the below code will work for my requirement?I got this code from SQLTeam forum(wrote by peso I think)declare @object int declare @return int declare @valid int set @valid = 0 --create the XMLHTTP object exec @return = sp_oacreate 'Microsoft.XMLHTTP', @object output if @return = 0 begin --Open the connection exec @return = sp_oamethod @object, 'open("GET","URLname", false)' if @return = 0 begin --Send the request exec @return = sp_oamethod @object, 'send()' --PRINT @returnend if @return = 0 begin declare @output int exec @return = sp_oamethod @object, 'status', @output output if @output = 200 begin set @valid = 1 end end end --destroy the object exec sp_oadestroy @object if @valid = 1 print 'valid' else print 'invalid' |
 |
|
|
|
|
|