• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 273
  • Last Modified:

get a URL from a stored procedure


Hello there, I want to trigger a URL call from a stored procedure...  

something like this..

//stored procedure

select * user where deleteaction=1
while not eof
geturl("http://www.servername.com/deleteuser.asp?user="& rs("user"))
end

//end

hope you can help, I really need your help so I am giving 500 points , tnx!
0
RIOSmx
Asked:
RIOSmx
  • 5
  • 4
  • 2
  • +2
1 Solution
 
StephenCairnsCommented:
are you meaning to return the url as an output of the stored proc or to actually run the url?
0
 
RIOSmxAuthor Commented:
I just want to "run" the url, so that some action is taken o that externall site... need no output from the stored procedure other than success or failure
0
 
HuyBDCommented:
Hi RIOSmx!
Try this!

<%while not rs.eof%>
<script>
window.open("http://www.servername.com/deleteuser.asp?user="& rs("user"))
</script>
<%wend%>
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
Anthony PerkinsCommented:
Consider posting in a more appropriate Topic Area, such as:
http://www.experts-exchange.com/Web/Web_Languages/ASP/
0
 
RIOSmxAuthor Commented:

Sorry, I need to do this inside a STORED PROCEDURE , T-SQL language... not with ASP
0
 
StephenCairnsCommented:

if you run a stored proc it runs at the server, so you want the server to open a web page at its end? and do what with it? unless I'm working on the server i wont see it.
What happens if the sp is called more than once? lots of brouser windows all showing the same page?
What is this page supposed to do?
Maybe you could replicate the functionality of the web page somewhere else
0
 
RIOSmxAuthor Commented:

Ok, let me explain better...  Server A contains SQL 2005, Server B is a web server on any king...

I want to trigger a URL call from Server A to Server B using a stored procedure, any consideration for security, multiple triggering or else will be done be me. I just need to know how can I GET an URL from inside a stored procedure to any web page outside the box.

So @ Server A inside a Stored Procudure I will have a code as follows, I will not show T-SQL here its just an example...

//begin

select * user where deleteaction=1
while not eof
geturl("http://www.servername.com/deleteuser.asp?user="& rs("user"))
end

//end

Server B with domain (servername.com) will accept that URL call and do something about it...ill take care of that

geturl() function shown at the Stored Procedure on Server A should be able to call that URL I guess using XMLHTTP o WinHTTP, I dont know the syntaxt of how to use either inside a Stored Procedure (T-SQL) , that what I need..

Thanks!
0
 
StephenCairnsCommented:
getURL() Returns the URL that is used to connect to the data source.

you cant 'push' a page out from sql
the only way I can think of doing this would be to run your code from an asp page
ask the SQL server to supply the url sure but the asp page will then request the page you want to see and display it.


0
 
RIOSmxAuthor Commented:

I really dont need to display what comes out of that url, I just need to access that URL so that the server on the other end run a command..

Take a look at the thread in the url i am posting, I think it is all there but it is more complicated than what i need i am not really good a t-sql so I woudnt know how to do it simplier to my needs.. hope someone can help me out..

http://www.experts-exchange.com/Databases/Microsoft_SQL_Server/Q_20590344.html?query=get+url&topics=42
0
 
StephenCairnsCommented:
I dont understand what that has to do with your question unless I totally missunderstood what you wanted.
the thread you pointed is to get data into sql from a web page
what you have asked is to do is to load a web page from sql

If I've missunderstood what you are trying to do please tell me.
give me some background. that is the page supposed to do?
0
 
RIOSmxAuthor Commented:

Thank you I solved this on my own taking reference in the thread en my last post. I was pretty simple, just needed to OPEN a URL from a StoredProcedure, by OPEN I mean just view it wihtout displaying it just so the the web server on the other part could read son variables via GET in the URL.. tnx for your help anyways..
0
 
Anthony PerkinsCommented:
Great!  Now please close the question.  See here from the EE Help:

I answered my question myself. What do I do?
http://www.experts-exchange.com/Databases/Microsoft_SQL_Server/help.jsp#hi70
0
 
GranModCommented:
PAQed with points refunded (500)

GranMod
Community Support Moderator
0

Featured Post

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

  • 5
  • 4
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now