Did you try using list.updateUI() method?
For the ENTER action you can use the KeyListener.
Today I have not one, but two questions.
Dave Tolls wrote:Can you show us the code that executes the entered queries?
Because whatever code it is it seems to be thinking that has a ResultSet expected, which isn't the case iwth a DELETE operation.
Prasad Saya wrote:ResultSet rs = stmt.executeQuery(sql);
As Dave Tolls mentioned delete doesn't return a result set. You should use executeUpdate instead.
From Java API: executeUpdate executes the given SQL statement, which may be an INSERT, UPDATE, or DELETE statement or an SQL statement that returns nothing, such as an SQL DDL statement.
Dave Tolls wrote:Try getMessage.
I think that should hold just the "Incorrect syntax near the keyword 'FROM'" part.
Prasad Saya wrote:What is he SQL script you are trying to run?
Dave Tolls wrote:Why is spliiting that text on GO incorrect?
That does seem to be the delimiter.
Dave Tolls wrote:I still think the requirements need to be defined.
Because if this is supposed to take in any old stuff from the user then there's likely to be more work involved.
Are they expecting to run actual SELECT queries for example?
As for the exception, the stack trace will tell you exactly where it occurred, from which you should be able to determine what is null.
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your databasehttps://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database