Skip to content

Tag: jdbc

LocalDateTime and SQL Server JDBC 4.2 driver

I’m trying to use new java.time classes with most recent version of Sql Server JDBC driver. As I read it should just work with methods: PreparedStatement.setObject() and ResultSet.getObject(). So I created sample code, and can’t get it work with ResultSets. I don’t know what I’m doing …

Select database columns for a JDBC statement query

I try to execute this: but i get this result from my tomcat server logs: Please take note that I have inspected by database tables and the comment_desc is a column. In fact I try another column’s output string and I get a result. Answer If you only need those two columns you could do something like this…

Unable to connect to Phoenix using JDBC

I have a Hadoop Cluster set up with HBase and Phoenix and I’m trying to connect to Phoenix using JDBC, but I am sort of unable to get a successful connection. I want to use JDBC to connect using Python 3.x but as for simple test purposes I set up a connection using Java in Eclipse. I was originally usin…

Mapping SQL NUMERIC[10,0] to java type

I need to map NUMERIC[10,0] parameter type of a sybase stored procedure to a java type. What would be this type? Also, if you can help me define a regular expression for this NUMERIC[10,0] type I’ll be greatful. Answer Use Long as Integer is to short to map all possible values. Have a look at MAX_VALUE …