Paul Clapham wrote:You say you get an empty ResultSet... but you would get the identical output from that code if an Exception were thrown, namely no output. You haven't eliminated that possibility, you've just completely ignored it. Replace line 35 in your original post by this:
Jan Cumps wrote:Can you check the type of the key column in SQLServer. Maybe when importing it from Access, the type is no longer numeric.
What happens if you query: from table where KEY1 = '16775342' ?
Paul Sturrock wrote:SQL Server Management studio auto commits by default. If you are not sure what "commit" means in a database context I would recommend you stop coding and take a bit of time to read up on database concepts. Life will be far less painful if you do.
It might be an idea to use the SQL Server profiling tool to make sure you are running the SQL you believe you are. It could be you are using different schemas or your statement is subtly different.
As another aside, this:
kind of defeats one of the purposes of JDBC. You might want to change that call to use a String read from somewhere.
Jan Cumps wrote:... and please don't change your original first post. Other people will now not understand what we were talking about.
Jan Cumps wrote:Have you committed all the inserts that you did in SQL Server Management Studio ?
Jan Cumps wrote:What happens if you use:
rset = st.executeQuery(query);
And it's better not to use "SELECT *". Use the SELECT real column names".
Have you tried something similar with a non-delimited column name?
Tom Reilly wrote:Before you edited your post, you had two different select statements. One had "where key=XXXX" and the other had "where key=YYYY"
Christophe Verré wrote:What about the returned value of getQuery ? Is it ok ? Isn't getQuery returning you too many results ?
Darryl Burke wrote:updateUI() isn't the correct method to invoke after adding/removing components from a visible container. Use revalidate() and repaint() instead.