Can you execute the SQL generated by EOF/WO in another DB tool?

I'm guessing:

call find_zips 04103

With that said though, why are you doing it this way? You are creating far more 
work for yourself (unless find_zips has tons of business logic in it that you 
don't want to duplicate in code).

Dave

On Dec 28, 2009, at 12:43 PM, Mark Woollard wrote:

> Am trying to get rows from a stored procedure, first time I've tried to do 
> this with WO. I have a stored procedure in the database (mysql) find_zips 
> which takes a single argument of a zip code as a varchar. I've created a 
> stored procedure in the Entity Model FindZIps with a single argument to match 
> the procedure. I'm using it as follows:
> 
>               NSArray<NSDictionary> results;
>               NSDictionary<String,String> args = new 
> NSDictionary<String,String>(searchString,"search");
>               results = 
> EOUtilities.rawRowsForStoredProcedureNamed(ec,"FindZips",args);
> 
> I get the following error from the rawRowsForStoredProcedureNamed method:
> 
> EvaluateExpression failed: 
> <com.webobjects.jdbcadaptor.MySQLPlugIn$MySQLExpression: \"{ call find_zips 
> (?)}\" withBindings: 1:\"04103\"(search)>:\n    Next exception:SQL 
> State:42000 -- error code: 1305 -- msg: FUNCTION find_zips does not exist
> 
> It seems to me the call being generated is correct and since the procedure 
> exists (and is being used by non-WO code without problem) am a bit stuck. I'm 
> probably missing something obvious as new to WO so anyone got any ideas?
> 
> Thanks
> Mark
> 
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      ([email protected])
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/webobjects-dev/webobjects%40avendasora.com
> 
> This email sent to [email protected]

David Avendasora
Senior Software Engineer
K12, Inc.

*****
WebObjects Documentation Wiki : 
http://wiki.objectstyle.org/confluence/display/WO/
*****
WebObjects API: 
http://developer.apple.com/legacy/mac/library/documentation/MacOSXServer/Reference/WO54_Reference/index.html
*****

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to