I wonder if i could pick anyones brains on somthing?
public void show(String add)
{
try
{
statement.execute("select * from Staff_Details WHERE Address2 =" + add);
This is a section of code im working on. The string variable add at the end of the SQL statement is not working for me. But if i say, put in the value that, add , references, from the argument passed in the main method ie.
'London' in single quotes, it works fine. ie.
statement.execute("select * from Staff_Details WHERE Address2 = 'London'" );
I need to use the value passed in the argument. I think i need to cast this value from a String variable add to some other type, within the SQL statement?
Can anyone help me? :(
Regards
Steven