Discussion:
what does "SQL statement would generate a row count" mean?
Sven Köhler
2004-02-02 15:49:16 UTC
Permalink
I get the following exception.

com.sap.dbtech.jdbc.exceptions.SQLExceptionSapDB: SQL statement would
generate a row count.
at
com.sap.dbtech.jdbc.CallableStatementSapDB.executeQuery(CallableStatementSapDB.java:661)
at de.djh.tools.ExportKochan.main(ExportKochan.java:90)

I have no clue what that means, and the query works fine in SQL-Studio.
--
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe: http://lists.mysql.com/maxdb?unsub=gcdm-***@m.gmane.org
Sven Köhler
2004-02-02 16:15:15 UTC
Permalink
Post by Sven Köhler
I get the following exception.
com.sap.dbtech.jdbc.exceptions.SQLExceptionSapDB: SQL statement would
generate a row count.
Well, i executed the wrong query, now it works, but the message still
has no meaning to me.
--
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe: http://lists.mysql.com/maxdb?unsub=gcdm-***@m.gmane.org
Schroeder, Alexander
2004-02-03 08:01:50 UTC
Permalink
Hello Sven,

JDBC requires that :
------------------------------------------------------------------------------------------------------------------
public ResultSet executeQuery()
throws SQLException

Executes the SQL query in this PreparedStatement object and returns the ResultSet object generated by the query.

Returns:
a ResultSet object that contains the data produced by the query; never null
Throws:
SQLException - if a database access error occurs or the SQL statement does not return a ResultSet object
------------------------------------------------------------------------------------------------------------------

Which simply means that you cannot execute SQL statements which don't return a result set using 'executeQuery'.
(and vice versa 'executeUpdate' for queries). If in doubt, use 'execute' and query later with 'getResultSet' or
'getUpdateCount'.

Regards

Alexander Schröder
SAP DB, SAP Labs Berlin
-----Original Message-----
Sent: Monday, February 02, 2004 5:15 PM
Subject: Re: what does "SQL statement would generate a row
count" mean?
Post by Sven Köhler
I get the following exception.
com.sap.dbtech.jdbc.exceptions.SQLExceptionSapDB: SQL
statement would
Post by Sven Köhler
generate a row count.
Well, i executed the wrong query, now it works, but the message still
has no meaning to me.
--
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
--
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe: http://lists.mysql.com/maxdb?unsub=gcdm-***@m.gmane.org
Loading...