Re: getSchemas() doesn't return a full list of schemas. Driver Bug

Tech-Archive recommends: Fix windows errors by optimizing your registry





Joe Weinstein wrote:



Chris2912 wrote:

As I received no response from this forum, is there any suggestion where else I might get help for my problem?


I find that the driver is broken, but maybe not in the way you report.
GetSchema() is supposed to return a two-column resultset, with
TABLE_SCHEM String => schema name
TABLE_CATALOG String => catalog name (may be null)

I find the 1.2 driver's getSchema() call is doing this query:

select name from sysusers

This is only returning the first of the specified two columns.

I suggest the driver implement the getSchemas() call with:

select name 'TABLE_SCHEM', db_name() 'TABLE_CATALOG' from sysuser

Joe Weinstein at BEA Systems


I think you may be getting the wrong answer for one of two reasons:

1 - Is your current/default database context a database
that allows access to the schemas you want to see?

2 - Are you (or the driver) confusing schemas and users,
such as would be seen with a query "select name from syslogins"?

Joe Weinstein at BEA Systems


.



Relevant Pages

  • Re: Java vs SQL Server float datatype limits
    ... However Java double has a much wider range: ... Joe Weinstein at BEA Systems ... So I would have imagined that an SQL Server driver either handle the ... The JDBC specification says something about the driver being expected to coerce the Java data type into the correct data type for the server the driver is representing. ...
    (microsoft.public.sqlserver.jdbcdriver)
  • Re: JDBC and JVM question
    ... > public SybDriver() ... > change of regime in DriverManager from one perfectly good driver instance ... > Joe Weinstein at BEA ... There would be no need for the registerWithDriverManager() routine. ...
    (comp.lang.java.databases)
  • Re: ResultSet.updateString against DB2 giving "Column not updatable"
    ... I just based my conclusion on the obvious driver response ... program that makes a JDBC connection, creates a table, inserts ... Check the driver documents about this. ... Joe Weinstein at BEA Systems ...
    (comp.lang.java.databases)
  • Re: executeBatch()
    ... Joe Weinstein wrote: ... >> Is this a limitation of the database or of the driver? ... > all together in one network packet, ... If it doesn't, it's because the driver ...
    (microsoft.public.sqlserver.jdbcdriver)
  • Re: JDBC and JVM question
    ... >> I just checked the very latest 5.5 EBF driver. ... >> public class SybDriver ... >> Joe Weinstein at BEA ... >There would be no need for the registerWithDriverManager() routine. ...
    (comp.lang.java.databases)