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 "Mamta A. Satoor (JIRA)" <de...@db.apache.org> on 2005/09/26 20:05:49 UTC

[jira] Updated: (DERBY-582) Dynamic parameter should be allowed to be the operand of unary operator "-". Derby throws exception 42X36: The '-' operator is not allowed to take a ? parameter as an operand."

     [ http://issues.apache.org/jira/browse/DERBY-582?page=all ]

Mamta A. Satoor updated DERBY-582:
----------------------------------

    Attachment: Derby582UnaryDynamic092605.txt

The patch fixes the problem and allows parameters for unary minus and unary plus. The parameter will be bound to DOUBLE. Can a committer please commit this if it looks good?

> Dynamic parameter should be allowed to be the operand of unary operator "-". Derby throws exception 42X36: The '-' operator is not allowed to take a ? parameter as an operand."
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>          Key: DERBY-582
>          URL: http://issues.apache.org/jira/browse/DERBY-582
>      Project: Derby
>         Type: Bug
>   Components: JDBC
>     Versions: 10.2.0.0
>     Reporter: Mamta A. Satoor
>     Assignee: Mamta A. Satoor
>  Attachments: Derby582UnaryDynamic092605.txt
>
> A simple test program which uses dynamic parameter for unary operator "-" fails with an exception. Following is the snippet of the code
> 	ps = con.prepareStatement("select * from t1 where c11 = -?");
> 	ps.setInt(1,1);
> 	rs = ps.executeQuery();
> The prepareStatement call fails with following exception
> SQLSTATE(42X36):ERROR 42X36: The '-' operator is not allowed to take a ? parameter as an operand.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira