Skip to content

Cannot set String value to a CLOB column in MonetPreparedStatement #6349

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
monetdb-team opened this issue Nov 30, 2020 · 0 comments
Closed
Labels
bug Something isn't working

Comments

@monetdb-team
Copy link

Date: 2017-07-11 13:31:57 +0200
From: Manuel <>
To: Martin van Dinther <<martin.van.dinther>>
Version: 11.25.23 (Dec2016-SP5)
CC: martin.van.dinther

Last updated: 2017-07-28 09:53:35 +0200

Comment 25450

Date: 2017-07-11 13:31:57 +0200
From: Manuel <>

User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36
Build Identifier:

I am using MonetPreparedStatement to build an sql. I am unable to set the string value in a where condition for a column of type CLOB.

An SQLException with message Conversion not allowed, and sqlState = "M1M05".

My guess is that the method

public void setObject(int parameterIndex, Object x, int targetSqlType, int scale) throws SQLException;

in MonetPreparedStatement, is missing the case 2005 (CLOB).

Reproducible: Always

Steps to Reproduce:

  1. have a table with a column if type CLOB
  2. use the jdbc driver to open a connection to a database, and build a precompiled SQL statement using PreparedStatement
    3.set the value strign value to a CLOB argument.

Actual Results:

An sql exception is thrown

Expected Results:

the query gets built

Comment 25461

Date: 2017-07-13 15:35:15 +0200
From: MonetDB Mercurial Repository <>

Changeset 0112d8496636, made by Martin van Dinther martin.van.dinther@monetdbsolutions.com in the monetdb-java repo, refers to this bug.

For complete details, see https://dev.monetdb.org/hg/monetdb-java?cmd=changeset;node=0112d8496636

Changeset description:

Added test program for bug #6349.
Added  case Types.CLOB:  at several places in setObject(). This fixes bug #6349
Also replaced   "" + x   into direct  <Class>.toString(x)

Comment 25462

Date: 2017-07-13 15:40:36 +0200
From: MonetDB Mercurial Repository <>

Changeset 7868f3b4b78d made by Martin van Dinther martin.van.dinther@monetdbsolutions.com in the MonetDB repo, refers to this bug.

For complete details, see https//devmonetdborg/hg/MonetDB?cmd=changeset;node=7868f3b4b78d

Changeset description:

Activate new java JDBC test program for bug #6349

Comment 25510

Date: 2017-07-28 09:53:35 +0200
From: @sjoerdmullender

A new JDBC driver (2.26) has been released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants