Hi, I have been working away for a while now on getting familiar with Java EE and I am trying to connect to a database. I believe I have been successful but I now have what seems to be a syntax problem with SQL. My error being produced by my testpage is
SELECT (*) FROM 'product';
: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT (*) FROM 'product'' at line 3"
As you can see I am working through the affablebean tutorial. I believe I have a connection to the database but I am getting SQL syntax errors now. Can someone please point me in the right direction for the solution to my problem.
Thanks, I found the solution to my problem. I had a statement which stated which database to use "USE affablebean" it was in the same place as the next statement
"SELECT * FROM tablename". I placed the first statement in a separate tag <sql:update> and the page now works correctly.