September 25, 2008

A weird output from a SQL query to Sybase

Environment: Sybase OS, J2EE app running on Tomcat, Driver used was com.sybase.jdbc3.jdbc.SybDataSource

The query goes like this "Select T1.UserId AS ID, " T2.UserId AS GrID ......"

Now the output when logged shows this way
Exiting getColumnNames = [UserId, UserId, .................]

So the "AS" keyword seems to be not working. Problemssssssss

Now the solution was we changed the driver to net.sourceforge.jtds.jdbc.Driver downloaded from Sourceforge. Just downloaded and extracted the jtds-1.2.2.jar to the lib and a simple restart with changes in the connection information.

Hope this would be useful to someone.

No comments:

Post a Comment

This is how we learn. Say it right away ...