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!
RIOSmxAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.