I am evaluating jconnect 5.0 or my company and have troubles by reading
any metadata from my Sybase database.
My source code is as follow:
Properties props=System.getProperties();
props.put("jdbc.drivers", "com.sybase.jdbc2.jdbc.SybDriver");
System.setProperties(props);
Connection
connection=DriverManager.getConnection("jdbc:sybase:Tds:intra2:5000",
"sa", "ch123intra");
DatabaseMetaData meta=connection.getMetaData();
and i get the following exception;
java.sql.SQLException: JZ0SJ: 'metadata accessor" informations not found
in this database
at com.sybase.jdbc2.jdbc.ErrorMessage.raiseError(ErrorMessage.java:413)
at com.sybase.jdbc2.jdbc.MdaManager.loadMetaData(Compiled Code)
at com.sybase.jdbc2.jdbc.MdaManager.<init>(MdaManager.java:135)
at com.sybase.jdbc2.jdbc.MdaManager.<init>(MdaManager.java:120)
at
com.sybase.jdbc2.jdbc.SybConnection.checkMDA(SybConnection.java:1205)
at
com.sybase.jdbc2.jdbc.SybConnection.checkDBMD(SybConnection.java:1221)
at
com.sybase.jdbc2.jdbc.SybConnection.getMetaData(SybConnection.java:630)
at EJB.Test.main(Test.java:30)
Was is this for an "accessor" ?
I use JDK 1.2 with Sybase version 11 Server.
Could anybody help me.
Thanks in advance
Alexei
Alexei,
You have stumbled on to the most asked question within the jConnect
newsgroups. In fact, I just answered the very same question in the
jConnect40 newsgroup :-)
The problem that you are encountering is one of:
- jConnect will query the backend to see what capabilities are available
during the initial login
- You are using a DatabaseMetadata, Connection which requries the
metadata information from the backend.
Whenever you install a version of jConnect, you need to install the
script:
ASE - sql_server.sql
ASA - sql_anywhere.sql
This script may be found in $JDBC_HOME/sp and may be installed using any
flavor of isql (dblib/ctlib, java IsqlApp, Jisql)
We will be changing the above message soon to make it a bit clearer as
to what is needed to be done.
Regards,
Lance
team sybase
--
===============================================================================
Lance J. Andersen Email: lan...@sybase.com
Sybase Product Support Engineering Phone:(781) 564-6336
77 South Bedford Street Fax: (781) 564-6148
Burlington, MA 01803
The Dark Knight Returns!!! Let's Go Penguins!!!
===============================================================================