• 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
Re: executeStoredProcedureNamed with no parameters to MySQL 5
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: executeStoredProcedureNamed with no parameters to MySQL 5


  • Subject: Re: executeStoredProcedureNamed with no parameters to MySQL 5
  • From: Mat Johnson <email@hidden>
  • Date: Mon, 26 May 2008 16:32:47 -0500

It was the driver.

--Mat

On May 26, 2008, at 4:07 PM, Mat Johnson wrote:

Would anyone suggest a solution to the following problem? 

I'm trying to call a stored procedure in MySQL 5 from WO 5.3 using executeStoredProcedureNamed via mysql-connector-java-3.1.8bin.jar .  The sproc is a cursor that takes no arguments and returns none.  In MySQL I simply call it like this: 'call ItemsCursor()' and that does the trick.  When I call it from WO I get an error and it looks like its calling it this way: 'call ItemsCursor' which seems to be missing the critical '()'.  I have no idea on how to get this in place nor why WO doesn't automatically do that.  Maybe there is another reason for this issue.  I tried it with null and with a Dictionary as shown below.

This is the code I use to try to call the sproc:
  
public WOComponent pushTran() {
try {
NSMutableDictionary param = new NSMutableDictionary();
EOUtilities.executeStoredProcedureNamed( session().defaultEditingContext(), "itemscursor", param );
} catch (Exception e) { // could be more specific...
NSLog.err.appendln( "Issue pushing transactions: " + e.toString() );
}
return null;
}

This is the Error that returns:  

13105 [main] WARN NSLog  - 
34709 [WorkerThread0] INFO er.transaction.adaptor.Exceptions  - JDBC Exception occured: com.webobjects.jdbcadaptor.JDBCAdaptorException: EvaluateExpression failed: <com.webobjects.jdbcadaptor.MySQLPlugIn$MySQLExpression: "{ call ItemsCursor}">:
    Next exception:SQL State:42000 -- error code: 1064 -- msg: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
34712 [WorkerThread0] WARN NSLog  - Issue pushing transactions: com.webobjects.jdbcadaptor.JDBCAdaptorException: EvaluateExpression failed: <com.webobjects.jdbcadaptor.MySQLPlugIn$MySQLExpression: "{ call ItemsCursor}">:
    Next exception:SQL State:42000 -- error code: 1064 -- msg: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

Thanks,
--Mat

 _______________________________________________
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

References: 
 >executeStoredProcedureNamed with no parameters to MySQL 5 (From: Mat Johnson <email@hidden>)

  • Prev by Date: executeStoredProcedureNamed with no parameters to MySQL 5
  • Next by Date: WOWODC 2008 t-shirts now available!
  • Previous by thread: executeStoredProcedureNamed with no parameters to MySQL 5
  • Next by thread: WOWODC 2008 t-shirts now available!
  • Index(es):
    • Date
    • Thread