Need help with SQL query

View: New views
1 Messages — Rating Filter:   Alert me  

Need help with SQL query

by vieraci :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


This statement:

Statement stmt = myConn.createQuery();

I get this error in the popup where the red (!) is displayed to the left of
the statement in the Netbeans 6.1 IDE

createQuery(java.lang.string) in javax.persistence.EntityManager cannot be
applied to incompatible types
Found javax.persistence.EntityManager.createQuery
required: com.mysql.jdbc.Statement

Driver is mysql-connector-java-5.1.5 (Revision ${svn revision})
myConn is an EntityManager bean
Even if I give the complete name (com.mysql.jdbc.Statement stmt = ) is same
error.

Why is this so ?

--
View this message in context: http://www.nabble.com/Need-help-with-SQL-query-tp16993146p16993146.html
Sent from the Netbeans - J2EE mailing list archive at Nabble.com.