String query = "select a1 from tableA where a2= '" + strVAR + "'";
should be alright, if not, what's the err msg?