db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-6389) Update adminguide's list of differences between client and embedded
Date Tue, 29 Oct 2013 16:18:31 GMT

    [ https://issues.apache.org/jira/browse/DERBY-6389?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13808137#comment-13808137

Knut Anders Hatlen commented on DERBY-6389:

The client seems to accept any values in the array, as long as the length is exactly one.
So if you try

            String [] colNames = new String [] { "abba" };
            s.execute("insert into t1(b) values('hi')", colNames);
            ResultSet rs = s.getGeneratedKeys();

            int [] colIndexes = new int [] { 123 };
            s.execute("insert into t1(b) values('hello')", colIndexes);
            rs = s.getGeneratedKeys();

it will still succeed, even though there's no column named "abba" and no column with position

The embedded driver seems to be more picky. If you change the column name in the string array
from "a" to "A", it starts working.

The reference manual mentions these differences: http://db.apache.org/derby/docs/10.10/ref/crefjavstateautogen.html

> Update adminguide's list of differences between client and embedded
> -------------------------------------------------------------------
>                 Key: DERBY-6389
>                 URL: https://issues.apache.org/jira/browse/DERBY-6389
>             Project: Derby
>          Issue Type: Bug
>          Components: Documentation
>            Reporter: Knut Anders Hatlen
>            Assignee: Kim Haase
>         Attachments: ClientExample.java, EmbeddedExample.java
> The admin guide has a chapter that describes known differences between the client driver
and the embedded driver: http://db.apache.org/derby/docs/10.10/adminguide/cadminapps.html
> Most of this information was added for the original network client implementation in
10.1 (DERBY-371) and has not been updated since.
> For example, http://db.apache.org/derby/docs/10.10/adminguide/cadminappsclientdiffs.html
says SQLStates for exceptions on the client may be null. I believe this was fixed in 10.2
as part of DERBY-254.
> It also says that SQLExceptions (and SQLWarnings) won't be chained, but that was fixed
in 10.3 (DERBY-2692). That outdated information is also repeated here: http://db.apache.org/derby/docs/10.10/adminguide/radminapps811974.html

This message was sent by Atlassian JIRA

View raw message