« Return to Thread: Need help creating SQL query

Need help creating SQL query

by vieraci :: Rate this Message:

Reply to Author | View in Thread


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-creating-SQL-query-tp16993048p16993048.html
Sent from the Netbeans - Dev mailing list archive at Nabble.com.

 « Return to Thread: Need help creating SQL query