I want to fetch data from msaccess database using like. but my query not run.
Here is my code.

String pin=cmblocation.getSelectedItem().toString();
rs2=st2.executeQuery("Select * from pin_numbers where pin_number like 'pin&????'");

. But my query is not run. Please help me.

Do you think that query is correct? I don't. If you do not believe me try to execute directly on database (command line or gui tool). What are you trying to pass as "pin&????" ?

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.