• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
D2WS, Fetch with Stored Procedure?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

D2WS, Fetch with Stored Procedure?


  • Subject: D2WS, Fetch with Stored Procedure?
  • From: email@hidden
  • Date: Fri, 15 Jun 2007 19:38:38 -0400

I am trying to make a fetch using a stored procedure via EO Modeler and would like some insight please. I add the fetch to a table object and in the fetch interface select the 'SQL' tab. Under this tab I click the 'Use Stored Procedures' toggle and see all SPROCs. I try to select the one I want but no luck. How do I select the SPROC I want to use from the list? From there I'll try to use in in the D2WS app.

I know that many (most) of you don't like the idea of sprocs but I don't know of a better way to get the functionality I need into my D2WS project. In case anyone is willing to suggest another way to get the needed functionality to a WSDL, here is what the sproc from MySQL 5.1 looks like:

PARAMETER: TargetZip

BEGIN
SET @targetLng = (Select longitude from vw_ZCUG where zip= TargetZip);
SET @targetLat = (Select latitude from vw_ZCUG where zip= TargetZip );
SELECT vw_DealerLongLat.*, ROUND(ACOS(SIN(vw_DealerLongLat.latitude * 0.017453293) * SIN(@targetLat * 0.017453293) + COS(vw_DealerLongLat.latitude * 0.017453293) * COS(@targetLat * 0.017453293) * COS(@targetLng * 0.017453293 - vw_DealerLongLat.longitude * 0.017453293)) * 3956, 1) AS distance
FROM vw_DealerLongLat
WHERE Active_Flag = 1
ORDER BY distance ASC
LIMIT 10;
END



Essentially it shows "dealers" from nearest to furthest (based on a postal code) and includes the mile distance. Works well as a Query in MySQL. I tried raw SQL also but it didn't work the way I was doing it. I need this to be a webservice so a client can input a postal and get the array returned.
Thanks for any insight and help.
--Mat
________________________________________________________________________
AOL now offers free email to everyone. Find out more about what's free from AOL at AOL.com.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
  • Prev by Date: How to Consume D2WS via .NET
  • Next by Date: WO WWDC NDA
  • Previous by thread: Re: How to Consume D2WS via .NET
  • Next by thread: WO WWDC NDA
  • Index(es):
    • Date
    • Thread