I'm very confused about this situation.
I'm developing a Spring Web Based App, I'm trying to implement a simple SQL Query but for some reasons there is a consistency problem.
When I Run in Sybase Central:
SELECT COUNT(*) FROM "DBA"."USUARIOS"
I got 68 rows, but When I run the same query from my java program I got 21 rows.
I don't know if it's a driver problem, I'm very confused.
My Configuration:
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName" value="${jdbc.driverClassName}"/>
<property name="url" value="${jdbc.url}"/>
<property name="username" value="${jdbc.username}"/>
<property name="password" value="${jdbc.password}"/>
</bean>
<context:property-placeholder location="classpath:jdbc.properties" />
<bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
<constructor-arg ref="dataSource"/>
</bean>
<bean id="productoDAO" class="com.grupolainmaculada.siscom.persistencia.JdbcProductoDAO">
<property name="jdbcTemplate" ref="jdbcTemplate"/>
</bean>
Properties File:
jdbc.driverClassName=com.sybase.jdbc4.jdbc.SybConnection
jdbc.url=jdbc:sybase:Tds:192.168.2.177:2638/bdSiSAC02
jdbc.password=wap
jdbc.username=dba
I'm using jdk 7 and jconnect 7.0
Best Regards,
UPDATE Whe I run the next code:
System.out.println(connection.getCatalog());
The connection is pointing to other database, this is very rare for me I don't understand why is not pointing to my database if this is defined well.