18 messages in com.mysql.lists.javaRE: getProcedures() returns an empty ...| From | Sent On | Attachments |
|---|---|---|
| Lee Breisacher | 18 May 2004 13:54 | |
| Mark Matthews | 18 May 2004 14:03 | |
| Lee Breisacher | 18 May 2004 14:13 | |
| Mark Matthews | 18 May 2004 14:20 | |
| Lee Breisacher | 18 May 2004 16:12 | |
| Lee Breisacher | 18 May 2004 16:42 | |
| GV | 01 Dec 2004 23:52 | |
| Thomas Lundström | 02 Dec 2004 00:17 | |
| GV | 02 Dec 2004 01:45 | |
| GV | 02 Dec 2004 01:46 | |
| Sanjeet | 02 Dec 2004 01:51 | |
| Sanjeet | 02 Dec 2004 02:28 | |
| David Black | 02 Dec 2004 02:54 | |
| Rhino | 02 Dec 2004 03:00 | |
| Alec...@Quantel.Com | 02 Dec 2004 03:38 | |
| GV | 02 Dec 2004 04:21 | |
| Thomas Lundström | 02 Dec 2004 04:49 | |
| GV | 02 Dec 2004 07:09 |
| Subject: | RE: getProcedures() returns an empty resultset![]() |
|---|---|
| From: | Lee Breisacher (LBre...@seagullsw.com) |
| Date: | 05/18/2004 04:12:20 PM |
| List: | com.mysql.lists.java |
Darn. Indeed had the old jar in front of the new on the classpath. Sorry about that.
So now I'm getting result rows from getProcedures(). Thanks!
Next questions:
1. The "PROCEDURE_NAME" column has "PROCEDURE" for both procedures that are in the database. Is that correct?
2. Are there plans to implement getParameterMetaData() for a CallableStatement? (I get "Feature not implemented" when I call it).
Thanks,
Lee
-----Original Message----- From: Mark Matthews [mailto:ma...@mysql.com] Sent: Tuesday, May 18, 2004 2:21 PM To: Lee Breisacher Cc: ja...@lists.mysql.com Subject: Re: getProcedures() returns an empty resultset
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Lee Breisacher wrote:
Hmm, same result. Any other suggestions?
Thanks,
Lee
Have you looked at the unit tests in testsuite.regression.CallableStatementRegressionTest? They actually use this same method, and they work.
Are you sure you're _actually_ using Connector/J 3.1.x and not picking up some older version of Connector/J or MM.MySQL _without_ stored procedure support in your classpath (although your DBMD.supportsStoredProcedures() call should ferret that out)???
-Mark
-----Original Message----- From: Mark Matthews [mailto:ma...@mysql.com] Sent: Tuesday, May 18, 2004 2:04 PM To: Lee Breisacher Cc: ja...@lists.mysql.com Subject: Re: getProcedures() returns an empty resultset
Lee Breisacher wrote:
I'm using version 5.0 and Connector/J 3.1.1-alpha.
I created a simple stored procedure using command line. I connect to the database using Connector/J and execute:
Connection connection = DriverManager.getConnection("jdbc:mysql://localhost/menagerie"); System.out.println(connection + " " + connection.getCatalog() + " " + connection.getMetaData()); System.out.println("procedures: " + connection.getMetaData().supportsStoredProcedures()); ResultSet rs = connection.getMetaData().getProcedures(null, null, "%");
I get a valid ResultSet, but it is empty (rs.next() returns false). rs.getMetaData().getColumnCount() returns "8".
I also tried the explicit name of the procedure rather than "%" and still empty.
Am I doing something wrong creating the procedure, or is my call to getProcedures() incorrect?
Lee,
Please try a nightly build of Connector/J 3.1 from http://downloads.mysql.com/snapshots.php
There were some bugs fixed regarding stored procedures and metadata after 3.1.1 was released.
-Mark
-- Mr. Mark Matthews MySQL AB, Software Development Manager, J2EE and Windows Platforms Office: +1 708 332 0507 www.mysql.com
MySQL Guide to Lower TCO http://www.mysql.com/it-resources/white-papers/tco.php
- -- Mr. Mark Matthews MySQL AB, Software Development Manager, J2EE and Windows Platforms Office: +1 708 332 0507 www.mysql.com
MySQL Guide to Lower TCO http://www.mysql.com/it-resources/white-papers/tco.php -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFAqn4ttvXNTca6JD8RAnNqAJ4n715yEm/5OkLjKdNQQDwPWBuFkACcDvRZ 1XFf2gOz+HkQuuhg4d+iFM4= =Cffy -----END PGP SIGNATURE-----




