hi!!!
i have got a small problem wid an sql query that i m writting in jsp
the query is real simple... but i dont know y m not gettin it...
q="select '" +col+ "' from '" +ta+ "'";
Class.forName(sq.getName());
cn=DriverManager.getConnection(sq.getConnstr(),sq.getUser(),sq.getPwd());
st=cn.prepareStatement(q);
out.println("before query1");
rst=st.executeQuery();
q="select ? from ?";
Class.forName(sq.getName());
cn=DriverManager.getConnection(sq.getConnstr(),sq.getUser(),sq.getPwd());
st=cn.prepareStatement(q);
st.setString(1,col);
st.setString(2,ta);
out.println("before query1");
rst=st.executeQuery();
both r not workin...
can you tell me how to write such a query where i want a single column values of a table where both tablename n columnname r not directly placed in the query...??
thank u in advance