18 messages in com.mysql.lists.javaRe: getProcedures() returns an empty ...
FromSent OnAttachments
Lee Breisacher18 May 2004 13:54 
Mark Matthews18 May 2004 14:03 
Lee Breisacher18 May 2004 14:13 
Mark Matthews18 May 2004 14:20 
Lee Breisacher18 May 2004 16:12 
Lee Breisacher18 May 2004 16:42 
GV01 Dec 2004 23:52 
Thomas Lundström02 Dec 2004 00:17 
GV02 Dec 2004 01:45 
GV02 Dec 2004 01:46 
Sanjeet02 Dec 2004 01:51 
Sanjeet02 Dec 2004 02:28 
David Black02 Dec 2004 02:54 
Rhino02 Dec 2004 03:00 
Alec...@Quantel.Com02 Dec 2004 03:38 
GV02 Dec 2004 04:21 
Thomas Lundström02 Dec 2004 04:49 
GV02 Dec 2004 07:09 
Subject:Re: getProcedures() returns an empty resultset
From:Mark Matthews (ma@mysql.com)
Date:05/18/2004 02:20:23 PM
List:com.mysql.lists.java

-----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

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-----