0

I'm using javadb(netbeans) for a project and I am a total beginner.

I have a small app which searches an address database and brings back a data grid of results.

The users tpyes in all, or part of a street name into a jtextfield, hits a search button and the records are then filtered in a data grid.

I am writing simple sql queries which are working fine but I am strugging to indicate the where clause must be the jtextfield text. For example, what I need to do is the following:

SELECT * FROM tbl_addresses WHERE Street_Name = jTextfield.getstring() 

but obiously that doesn't work. I also need to ensure this works as a wildcard query.

Can anybody help?? Please??

BNL
  • 7,085
  • 4
  • 27
  • 32
pank
  • 1
  • 1

1 Answers1

0

You are using wrong method. You have to use jTextField.getText () instead of jTextField.getString ()

olyanren
  • 1,448
  • 4
  • 24
  • 42