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"

Recommended Answers

All 2 Replies

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 developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.