Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Exception during getColumns()

4 posts in JDBC Connect (product renamed to JConnect) Last posting was on 1997-07-08 13:44:02.0Z
Damodar Periwal Posted on 1997-04-06 03:32:56.0Z
Message-ID: <33470B58.4CC4@softwaretree.com>
Date: Sat, 05 Apr 1997 18:32:56 -0800
From: Damodar Periwal <dperiwal@softwaretree.com>
Reply-To: dperiwal@softwaretree.com
Organization: Software Tree, Inc.
X-Mailer: Mozilla 3.01 (WinNT; I)
MIME-Version: 1.0
CC: dperiwal@hotmail.com
Subject: Exception during getColumns()
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.jdbcconnect
Lines: 25
Path: forums-1-dub!forums-master.sybase.com!forums.powersoft.com
Xref: forums-1-dub sybase.public.jdbcconnect:1062
Article PK: 252811

I am getting the following exception while using getColumns() method
on a java.sql.DatabaseMetaData object dbMetaData:

First the relevant code:

public void addTableInfo (DatabaseMetaData dbMetaData) throws
SQLException {
System.out.println ("\nAdding TableInfo for " + tableName);
ResultSet columns = dbMetaData.getColumns(null, null, tableName,
"%");
...
}


Now the output:

Adding TableInfo for foo
Exception: java.sql.SQLException: Metadata accessor information was not
found on this database:
at com.sybase.jdbc.ErrorMessage.raiseError(ErrorMessage.java)
at com.sybase.jdbc.ErrorMessage.raiseError(ErrorMessage.java)
at
com.sybase.jdbc.SybDatabaseMetaData.getMetaDataAccessor(SybDatabaseMetaData.java)
at
com.sybase.jdbc.SybDatabaseMetaData.getColumns(SybDatabaseMetaData.java)
at jdx.TableInfo.addTableInfo(Databases.java:820)


What may I be doing wrong ? Thanks.

-- Damodar


David Clegg Posted on 1997-04-15 16:28:30.0Z
Message-ID: <3353ACAE.52BF6CC7@sybase.com>
Date: Tue, 15 Apr 1997 09:28:30 -0700
From: David Clegg <davec@sybase.com>
X-Mailer: Mozilla 2.01 (X11; I; Linux 1.2.13 i586)
MIME-Version: 1.0
To: dperiwal@softwaretree.com
Subject: Re: Exception during getColumns()
References: <33470B58.4CC4@softwaretree.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.jdbcconnect
Lines: 38
Path: forums-1-dub!forums-master.sybase.com!forums.powersoft.com
Xref: forums-1-dub sybase.public.jdbcconnect:1010
Article PK: 252762

There is an extra configuration step you need to do on your Database
Server to get full access to this MetaData. In the $JDBC_HOME/sp
directory are 2 sql scripts. sql_server.sql is for SQL Server,
sql_anywhere.sql is for SQL Anywhere servers. You need to run
these against your server (as "sa" for SQL Server or as "dbo" for
SQL Anwywhere) so that the jConnect driver knows how to get the
metadata you are looking for.

dave

> I am getting the following exception while using getColumns() method
> on a java.sql.DatabaseMetaData object dbMetaData:
>
> First the relevant code:
>
> public void addTableInfo (DatabaseMetaData dbMetaData) throws
> SQLException {
> System.out.println ("\nAdding TableInfo for " + tableName);
> ResultSet columns = dbMetaData.getColumns(null, null, tableName,
> "%");
> ...
> }
>
> Now the output:
>
> Adding TableInfo for foo
> Exception: java.sql.SQLException: Metadata accessor information was not
> found on this database:
> at com.sybase.jdbc.ErrorMessage.raiseError(ErrorMessage.java)
> at com.sybase.jdbc.ErrorMessage.raiseError(ErrorMessage.java)
> at
> com.sybase.jdbc.SybDatabaseMetaData.getMetaDataAccessor(SybDatabaseMetaData.java)
> at
> com.sybase.jdbc.SybDatabaseMetaData.getColumns(SybDatabaseMetaData.java)
> at jdx.TableInfo.addTableInfo(Databases.java:820)
>
> What may I be doing wrong ? Thanks.
>
> -- Damodar


Damodar Periwal Posted on 1997-07-07 23:53:03.0Z
Message-ID: <33C1815F.204A@softwaretree.com>
Date: Mon, 07 Jul 1997 16:53:03 -0700
From: Damodar Periwal <dperiwal@softwaretree.com>
Reply-To: dperiwal@softwaretree.com
Organization: Software Tree, Inc.
X-Mailer: Mozilla 3.01 (WinNT; I)
MIME-Version: 1.0
CC: dperiwal@softwaretree.com
Subject: getColumns() fails with "No resultset for this query"
References: <33470B58.4CC4@softwaretree.com> <3353ACAE.52BF6CC7@sybase.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.jdbcconnect
Lines: 28
Path: forums-1-dub!forums-master.sybase.com!forums.powersoft.com
Xref: forums-1-dub sybase.public.jdbcconnect:584
Article PK: 252336

I am running NT 4.0 with jdk1.1.2 and jConnect 2.1 with a
local Sybase SQL server/11.0.2.1/P/PC.

I have installed the stored procedures of the script
%JDBC_HOME%\sp\sql_server.sql

I am using the sample pubs2 database. When I make the following
call with tableName as "roysched" which exists in the database:

ResultSet columns = dbMetaData.getColumns(null, null, tableName,"%");

I get the error "no resultset for this query" with the
following exception stack:

com.sybase.jdbc.ErrorMessage.raiseError(ErrorMessage.java)
com.sybase.jdbc.ErrorMessage.raiseError(ErrorMessage.java)
com.sybase.jdbc.SybStatement.queryLoop(SybStatement.java)

com.sybase.jdbc.SybCallableStatement.executeQuery(SybCallableStatement.java)

com.sybase.jdbc.SybDatabaseMetaData.returnResults(SybDatabaseMetaData.java)

com.sybase.jdbc.SybDatabaseMetaData.getColumns(SybDatabaseMetaData.java)

What may be going on ?

The same call works with the JDBC-ODBC bridge and an ODBC driver to
a MS SQL Server database (and a Personal Oracle 7 database).

Thanks for any help.

-- Damodar


Lance Andersen Posted on 1997-07-08 13:44:02.0Z
Message-ID: <33C24422.1DBA@sybase.com>
Date: Tue, 08 Jul 1997 09:44:02 -0400
From: Lance Andersen <lancea@sybase.com>
X-Mailer: Mozilla 3.01Gold (X11; I; SunOS 5.5.1 sun4m)
MIME-Version: 1.0
To: dperiwal@softwaretree.com
Subject: Re: getColumns() fails with "No resultset for this query"
References: <33470B58.4CC4@softwaretree.com> <3353ACAE.52BF6CC7@sybase.com> <33C1815F.204A@softwaretree.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.jdbcconnect
Lines: 43
Path: forums-1-dub!forums-master.sybase.com!forums.powersoft.com
Xref: forums-1-dub sybase.public.jdbcconnect:583
Article PK: 252335

I just tried this using the latest version of jConnect
and it worked fine.

Damodar Periwal wrote:
>
> I am running NT 4.0 with jdk1.1.2 and jConnect 2.1 with a
> local Sybase SQL server/11.0.2.1/P/PC.
>
> I have installed the stored procedures of the script
> %JDBC_HOME%\sp\sql_server.sql
>
> I am using the sample pubs2 database. When I make the following
> call with tableName as "roysched" which exists in the database:
>
> ResultSet columns = dbMetaData.getColumns(null, null, tableName,"%");
>
> I get the error "no resultset for this query" with the
> following exception stack:
>
> com.sybase.jdbc.ErrorMessage.raiseError(ErrorMessage.java)
> com.sybase.jdbc.ErrorMessage.raiseError(ErrorMessage.java)
> com.sybase.jdbc.SybStatement.queryLoop(SybStatement.java)
>
> com.sybase.jdbc.SybCallableStatement.executeQuery(SybCallableStatement.java)
>
> com.sybase.jdbc.SybDatabaseMetaData.returnResults(SybDatabaseMetaData.java)
>
> com.sybase.jdbc.SybDatabaseMetaData.getColumns(SybDatabaseMetaData.java)
>
> What may be going on ?
>
> The same call works with the JDBC-ODBC bridge and an ODBC driver to
> a MS SQL Server database (and a Personal Oracle 7 database).
>
> Thanks for any help.
>
> -- Damodar

--
===============================================================================
Lance J. Andersen Email: lancea@sybase.com
Sybase Technical Support Phone:(617) 564-6336
77 South Bedford Street Fax: (617) 564-6148
Burlington, MA 01803

The Dark Knight Returns!!! Let's Go Penguins!!!
===============================================================================