String query="SELECT *FROM addresses"+
                     "WHERE lastname='"+
                     fields.last.getText()+"'";

What is wrong with the above SQL statement?
I got the error message as "Syntax error in FROM clause"

You need a space between * and FROM and also between adresses and WHERE

Hello! hollystyles

Thanks for your reply.
Now it is working.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.