This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes JDBC and the fly likes jframe not accepting sql query.. Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "jframe not accepting sql query.." Watch "jframe not accepting sql query.." New topic
Author

jframe not accepting sql query..

kunal vermaa
Ranch Hand

Joined: Jun 27, 2009
Posts: 51
i have a project in which i have created an object of "showrecord" jframe inside the "collect" jframe.. the "showrecord" class display all the record from the database.. but it is showing an SQL error.. please help me solve the problem..

collect class



showrecord class


please help..
Rob Camick
Ranch Hand

Joined: Jun 13, 2009
Posts: 1788
    
    2
> but it is showing an SQL error..

1) Well, then that would be an SQL problem, not a Swing problem

2) And we are not mind readers. We can't exeucte your code since we can't access your database, so we have no idea what the "SQL error message" is.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19216

Please http://faq.javaranch.com/java/TellTheDetails but also http://faq.javaranch.com/java/IsolateTheProblem

You have an SQL error, yet (as Rob C noticed) you haven't told us what SQL error. Either way, you can limit the code posted to the actual SQL code:
Now we have less code to read, I think I see the error:
If a column name has spaces in it, you must put grouping characters around it. For ODBC, Access and MS SQL that's brackets:

Moving to JDBC.


SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: jframe not accepting sql query..
 
Similar Threads
The INSERT INTO statement contains the following unknown field name: 'OPANo'.
Size of JFrame and JPanel
Can't Update Record ?
Regarding JTextfield and Jlabel
Can't Update Record ?