Use variable declared in Java within SQL query?

You are basically returning wrongWord from this SQL: SELECT wrongWord FROM dictionaryTable WHERE wrongWord = (?) Why not create a SQL like SELECT rightWord FROM dictionaryTable WHERE wrongWord = (?) And on the while loop, do while (existingKeywords.next()) { //Get rightWord column values here String rightWord = existsingKeywords. GetString("rightWord"); } Clearly, I'm sucking thumb since I don't know what columns dictionaryTable contains so it's an assumption Also, I've not shown how manage JDBC connections.

You are basically returning wrongWord from this SQL: SELECT wrongWord FROM dictionaryTable WHERE wrongWord = (?) Why not create a SQL like SELECT rightWord FROM dictionaryTable WHERE wrongWord = (?) And on the while loop, do while (existingKeywords.next()) { //Get rightWord column values here String rightWord = existsingKeywords. GetString("rightWord"); } Clearly, I'm sucking thumb since I don't know what columns dictionaryTable contains so it's an assumption. Also, I've not shown how manage JDBC connections.

Makes sense. Thanks so much! – Jay Mahendru Nov 26 '10 at 16:06.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions