aspose file tools*
The moose likes JDBC and the fly likes No such column in SQL server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "No such column in SQL server" Watch "No such column in SQL server" New topic
Author

No such column in SQL server

Shaun Appleton
Greenhorn

Joined: Oct 31, 2002
Posts: 21
When using my code(BMP), JBoss + MySQL on my development machine it all
works well. Transferring the same code to another machine JBoss + MS SQL Server 2000 throw a JDBC exception.
my BMP code uses the following SQL statement
select Tblcriteria.DOCcriteria, TblCapability.CoreCapability,
TblClass.Classification, TblEntry.* from Tblcriteria, TblCapability,
TblEntry, TblClass WHERE TblEntry.Classification = TblClass.ID AND
TblEntry.DOCCriteria = Tblcriteria.DOCcriteriaID AND
TblEntry.Capability = TblCapability.CoreCapabilityID
ORDER BY TblEntry.LISerial ASC
With both the Microsoft JDBC driver and the free jTDS drivers the
exceptions I get are
java.sql.Exception No such column TblClass.Classification
net.sourceforge.jtds.jdbc.AbstractResultSet.findColumn
net.sourceforge.jtds.jdbc.AbstractResultSet.getString
...
(for the jtds driver)
and
java.sql.Exception No such column TblClass.Classification
com.microsoft.jdbc.base.BaseException.createException
com.microsoft.jdbc.base.BaseException.getException
...
(for the microsoft driver)
The Table and column do exist and when I test the same SQL statement in
MS Access (using an ODBC connection) it returns the desired results.
Any pointers would be gratefully received.
Thanks,
Shaun
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: No such column in SQL server