I am writing an application that connects to a database. I run a select sql statement that joins two tables and I am trying to put the sql results into variables. But I am unable to, the values of the variables is always null. But when I try a simple select statment without a join, it works fine. Is there something that I am missing ? Why does it not work when I join the two tables. In my code, I have ResultSet rs = stmt.executeQuesty(sql); Do I have to use a different method of the statement object ? Any help is appreciated.
Joined: Aug 06, 2001
no man just make sure your sql statement actually gets results u want.. try running it directly on the database to see what you get. If the sql statement is correct and all, then i suggest u try this. It is better practice not to select * from table, especially in joins because the issue of the column arrangement has a question mark. It is better to select only the column names that you specifically want and then that should make it really clear . if the problem still persists tell me what u get exactly.
<b><i>KaReEm</i><br /><ul type="square"><li>SCJP-Free Range Web Developer <br /></ul></b>