incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dinusha Dilrukshi <sdddilruk...@gmail.com>
Subject Cassandra jdbc-driver: no viable alternative at character '?'
Date Thu, 08 Dec 2011 10:20:03 GMT
Hi,

I am using cassandra-jdbc driver and following is my code snip written for
delete a entry from column family.

String query1 = "delete from USER where key=?";
PreparedStatement stmt = con.prepareStatement(query1);
stmt.setString(1, "dinusha");
stmt.execute();

But I am getting following exception when it executes.

java.sql.SQLSyntaxErrorException: line 1:27 *no viable alternative at
character '?'*
at
org.apache.cassandra.cql.jdbc.CassandraStatement.doExecute(CassandraStatement.java:173)
at
org.apache.cassandra.cql.jdbc.CassandraStatement.executeUpdate(CassandraStatement.java:230)
at
org.apache.cassandra.cql.jdbc.CassandraPreparedStatement.executeUpdate(CassandraPreparedStatement.java:273)

This is not only with delete statement, I have experience this with UPDATE
statement as well.

Greatly appreciate if anyone can advice to overcome this problem?

Regards,
~Dinusha~

Mime
View raw message