Folks -
(to begin, let me apologize if this is html - we're using Notes and as far as I can 
tell I can't control the format).

When I try to run reversedb with Sybase, I get the following error:
com.sybase.jdbc2.jdbc.SybSQLException: Attempt to locate entry in sysdatabases for 
database '%' by name failed - no entry found under that name. Make sure that name is 
entered properly.

The problem is in a call to DatabaseMetaData.getTables("%", "%", '%", null).  I 
searched the archives of this list and saw that this issue has come up before.  
However, I'm not sure I agree with what has been said on the subject, since it was 
described as a bug in a JDBC driver (MySQL, in that case).  It seems to me, though, 
that the driver behavior is correct.

According to the docs for J2SE 1.4, the parameters for this method are:
catalog - a catalog name; must match the catalog name as it is stored in the database; 
"" retrieves those without a catalog; null means that the catalog name should not be 
used to narrow the search
schemaPattern - a schema name pattern; must match the schema name as it is stored in 
the database; "" retrieves those without a schema; null means that the schema name 
should not be used to narrow the search
tableNamePattern - a table name pattern; must match the table name as it is stored in 
the database
types - a list of table types to include; null returns all types

Note that the catalog parameter is NOT described as a pattern - it must be null, 
empty, or an exact match of the catalog name.  As I interpret this, "%" is not a legal 
value for this parameter.  If I change the first parameter to null, it works as 
intended (the next two parameters remain "%", although replacing them with null has 
the same effect.).

If my interpretation is correct, this would be a bug in reversedb.

What do others think?

Ken Bandes




-----------------------------------------------------------------
        Visit our Internet site at http://www.reuters.com

Get closer to the financial markets with Reuters Messaging - for more
information and to register, visit http://www.reuters.com/messaging

Any views expressed in this message are those of  the  individual
sender,  except  where  the sender specifically states them to be
the views of Reuters Ltd.

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to