Hello-
I have gotten JBoss to use a MSSQL database. I then realized I needed to write a PK class because my table had multiple PK fields. Now that I'm using a PK class I'm getting this error in my server.log:
2004-07-22 13:25:36,082 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.Pricing#findByCompanyID] Executing SQL: SELECT FROM PricingProfiles t0_p WHERE (t0_p.companyID = ?)
2004-07-22 13:25:36,180 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.Pricing#findByCompanyID] Find failedjava.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Incorrect syntax near the keyword 'FROM'.
This is the finder I have in the ejb-ql.xml file:
<query-method>
<method-name>findByCompanyID</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
</query-method>
<ejb-ql>select object(p) from PricingBean AS p where p.companyID=?1</ejb-ql>
I can't figure out why the query is not working.
Any help is greatly appreciated.
Thanks-
Michael
I solved it. Wrong column names. Doh!