List:MySQL and Java« Previous MessageNext Message »
From:Mark Matthews Date:May 21 2003 7:21pm
Subject:Re: preparedstatement and metadata
View as plain text  
-----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

    __  ___     ___ ____  __
   /  |/  /_ __/ __/ __ \/ /  Mark Matthews <mark@stripped>
  / /|_/ / // /\ \/ /_/ / /__ MySQL AB, SW Dev. Manager - J2EE/Windows
 /_/  /_/\_, /___/\___\_\___/ Flossmoor (Chicago), IL USA
        <___/ www.mysql.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

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

Thread
preparedstatement and metadataAdam Hardy21 May
  • Re: preparedstatement and metadataMark Matthews21 May
    • Re: preparedstatement and metadataAdam Hardy22 May
  • Re: preparedstatement and metadataJeff Mathis22 May
  • Re: preparedstatement and metadataJeff Mathis22 May
    • Re: preparedstatement and metadataAdam Hardy22 May
  • Re: preparedstatement and metadataShankar Unni22 May