SQL Stored Procedure & URL Response

  • I've been asked to find out whether it is possible to refer to a URL from within a stored procedure and receive a response back from that url into the stored procedure.

    I suspect that I cannot.

    I'll try to explain a little futher. I've been talking to a company who can calculate a routed distance between two points. This information is available by passing URL parameters to a url. The webpage sends back the answer.

    I need to obtain this information from within my stored procedure. My database and the system i make the request to are two entirley seperate entities.

    I'd be grateful for any feedback.

    Thanks for your time.

    Windows 2008 Server | SQL Server 2008

  • Potentially you can, but it's probably not a good idea. You'd have to be making call to objects with respect to SQL Server 2000 using the sp_OA* stored procedures or through the use of custom built extended stored procedures. If you're doing that, however, it's probably better to do this in code outside of SQL Server. You're still going to be incurring the time wait to get a response whether you do so from the web app itself or from SQL Server.

    Is there a reason the design wants to do this from SQL Server instead of the web application?

    K. Brian Kelley
    @kbriankelley

  • Thanks for the reply. We're considering working with an outside company who provide a routing and scheduling solution. Part of their system caclulates a routed distance between two points.

    Part of our software is a geo-fencing system which runs internally within our SQL database but cannot do the calculated distance side of things, only a straight line calculation.

    I agree about the delay, it was my main concern - I'd say it was pretty much unacceptable.

    I need to go back and talk to them.

    Thanks for your time once again.

    Windows 2008 Server | SQL Server 2008

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply