Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

JDBC driver issue: msg#00195

db.maxdb

Subject: JDBC driver issue

Hi,

I have a SQL statement that works fine when executed via SQL studio. When I am executing the same statement via JDBC and attempt to retrieve result data from the ResultSet I get the following exception:

Fatal Error: com.sap.dbtech.jdbc.exceptions.DatabaseException: [-4000]: Unknown result table at com.sap.dbtech.jdbc.packet.ReplyPacket.createException(ReplyPacket.java:71) at com.sap.dbtech.jdbc.ConnectionSapDB.throwSQLError(ConnectionSapDB.java:824) at com.sap.dbtech.jdbc.ConnectionSapDB.execute(ConnectionSapDB.java:483) at com.sap.dbtech.jdbc.ConnectionSapDB.execute(ConnectionSapDB.java:371) at com.sap.dbtech.jdbc.FetchInfo.executeFetchCommand(FetchInfo.java:244) at com.sap.dbtech.jdbc.FetchInfo.executeFetchFirst(FetchInfo.java:205) at com.sap.dbtech.jdbc.ResultSetSapDB.fetchFirst(ResultSetSapDB.java:2449) at com.sap.dbtech.jdbc.ResultSetSapDB.next(ResultSetSapDB.java:367) at ....

This is with the following driver version:

Implementation-Title: MaxDB JDBC Driver
Implementation-Version: 7.6.0 Build 000-000-003-034
Implementation-Vendor: MySQL MaxDB

The problem can be reproduced as follows:

create table t1 (a integer, b integer)
--
create table t2 (a integer, b integer)
--
create view v_t2 as
select distinct a, b from t2
--
insert into t1 (a,b) values (1,2)
--
insert into t2 (a,b) values (1,2)
--
select t1.a, v_t2.a
from t1, v_t2
where t1.a = v_t2.a

Executing the SQL statement above via SQL Studio works fine. Executing the same SQL statement via above mentioned JDBC driver will result in an exception. If the view is defined without 'distinct' the statement works fine via JDBC (but obviously with potentially different results).

Any idea if this is a known bug or if there is any workaround?

Thanks, Heiko

------------------------------------------------------------------
This mail has been inspected by Webwasher - a CyberGuard Company -
leading technology for E-mail and Web Security.

Webwasher - keeping your Web clean!
------------------------------------------------------------------

--
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe: http://lists.mysql.com/maxdb?unsub=gcdm-maxdb@xxxxxxxxxxx




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation

Home | advertise | OSDir is an inevitable website. super tiny logo