You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Ramin Moazeni (JIRA)" <ji...@apache.org> on 2007/07/16 21:02:04 UTC
[jira] Created: (DERBY-2943) execute() and executeUpdate() return
different SQLState in embedded and network client
execute() and executeUpdate() return different SQLState in embedded and network client
--------------------------------------------------------------------------------------
Key: DERBY-2943
URL: https://issues.apache.org/jira/browse/DERBY-2943
Project: Derby
Issue Type: Bug
Components: Network Client
Environment: Linux Fedora Core 6
Reporter: Ramin Moazeni
I noticed this issue as part of jdbcapi/statementJdbc30.java conversion to JUnit. The following
code snippet returns different SQLState in embedded and network client.
//create a table, insert a row, do a select from the table,
stmt.execute("create table tab1 (i int, s smallint, r real)");
stmt.executeUpdate("insert into tab1 values(1, 2, 3.1)");
/* Next two stmts will fail because there's no auto-generated
* column. These forms of "executeUpdate()" are tested more
* in the JUnit test, jdbcapi/AutoGenJDBC30Test.java.
*/
System.out.println("trying stmt.executeUpdate(String, int[]) :");
int[] columnIndexes = new int[2];
columnIndexes[0] = 1;
columnIndexes[1] = 2;
try {
stmt.executeUpdate("insert into tab1 values(2, 3, 4.1)", columnIndexes);
} catch (SQLException ex) {
BaseJDBCTestCase.assertSQLState("X0X0E", ex);
}
System.out.println("trying stmt.executeUpdate(String, String[]) :");
String[] columnNames = new String[2];
columnNames[0] = "I";
columnNames[1] = "S";
try {
stmt.executeUpdate("insert into tab1 values(2, 3, 4.1)", columnNames);
} catch (SQLException ex) {
BaseJDBCTestCase.assertSQLState("X0X0F", ex);
}
Using netwrok client, the returned SQL state is 0A000
Using embedded, the returned SQL state is either X0X0E or X0X0F
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (DERBY-2943) execute() and executeUpdate() return
different SQLState in embedded and network client
Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-2943?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kathey Marsden resolved DERBY-2943.
-----------------------------------
Resolution: Duplicate
Duplicate of DERBY-2653. The A0000 exception is the not implemented exception for methods taking columnNames and columnIndexes.
> execute() and executeUpdate() return different SQLState in embedded and network client
> --------------------------------------------------------------------------------------
>
> Key: DERBY-2943
> URL: https://issues.apache.org/jira/browse/DERBY-2943
> Project: Derby
> Issue Type: Bug
> Components: Network Client
> Environment: Linux Fedora Core 6
> Reporter: Ramin Moazeni
>
> I noticed this issue as part of jdbcapi/statementJdbc30.java conversion to JUnit. The following
> code snippet returns different SQLState in embedded and network client.
> //create a table, insert a row, do a select from the table,
> stmt.execute("create table tab1 (i int, s smallint, r real)");
> stmt.executeUpdate("insert into tab1 values(1, 2, 3.1)");
> /* Next two stmts will fail because there's no auto-generated
> * column. These forms of "executeUpdate()" are tested more
> * in the JUnit test, jdbcapi/AutoGenJDBC30Test.java.
> */
> System.out.println("trying stmt.executeUpdate(String, int[]) :");
> int[] columnIndexes = new int[2];
> columnIndexes[0] = 1;
> columnIndexes[1] = 2;
> try {
> stmt.executeUpdate("insert into tab1 values(2, 3, 4.1)", columnIndexes);
> } catch (SQLException ex) {
> BaseJDBCTestCase.assertSQLState("X0X0E", ex);
> }
> System.out.println("trying stmt.executeUpdate(String, String[]) :");
> String[] columnNames = new String[2];
> columnNames[0] = "I";
> columnNames[1] = "S";
> try {
> stmt.executeUpdate("insert into tab1 values(2, 3, 4.1)", columnNames);
> } catch (SQLException ex) {
> BaseJDBCTestCase.assertSQLState("X0X0F", ex);
> }
> Using netwrok client, the returned SQL state is 0A000
> Using embedded, the returned SQL state is either X0X0E or X0X0F
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.