7 messages in com.mysql.lists.javaRe: preparedstatement and metadata
FromSent OnAttachments
Adam Hardy21 May 2003 10:43 
Mark Matthews21 May 2003 12:21 
Adam Hardy22 May 2003 03:34 
Jeff Mathis22 May 2003 08:06 
Jeff Mathis22 May 2003 08:11 
Adam Hardy22 May 2003 08:26 
Shankar Unni22 May 2003 11:07 
Subject:Re: preparedstatement and metadata
From:Mark Matthews (ma@mysql.com)
Date:05/21/2003 12:21:19 PM
List:com.mysql.lists.java

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1

Adam Hardy wrote:

Hi,

ParameterMetaData meta = prepStatement.getParameterMetaData();

is causing me problems.

java.lang.AbstractMethodError:

com.mysql.jdbc.jdbc2.PreparedStatement.getParameterMetaData()Ljava/sql/ParameterMetaData;

at

org.apache.commons.dbcp.DelegatingPreparedStatement.getParameterMetaData(DelegatingPreparedStatement.java:347)

at org.blacksail.BaseFactory.read(BaseFactory.java:220)

This is new in java 1.4 - is it not possible to use it yet? I have mysql-java-connector-2.0.14.

Many thanks for any feedback. Adam

Connector/J 2.0.14 is _very_ old, it predates JDK-1.4 by quite a bit, so that explains the fact the method isn't there at all :)

MySQL versions prior to 4.1 don't have prepared statements at all, they are emulated in the JDBC driver. Therefore the driver can't implement this method for MySQL < 4.1.

MySQL 4.1 has 'true' prepared statements, but doesn't currently return parameter metadata for PreparedStatements, but this is planned sometime during the 4.1 timeframe.

-Mark

- -- For technical support contracts, visit https://order.mysql.com/?ref=mmma

iD8DBQE+y9HEtvXNTca6JD8RAoV4AJ4pO0v1+q1mBkewyUO2v2euuzq3wwCdER91 TbT8Le3YTwVRC68MFHDbe3s= =f7nw -----END PGP SIGNATURE-----