aspose file tools*
The moose likes Java in General and the fly likes problem with my jdbc/swing code Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "problem with my jdbc/swing code" Watch "problem with my jdbc/swing code" New topic
Author

problem with my jdbc/swing code

Sireesha ikkurthi
Greenhorn

Joined: Nov 17, 2005
Posts: 7
jdbc/swing
============

Following is my code to retrive data from my ms-access table NAME to display the employee name and his id.

But iam getting the error as

can not resolve the symbol varaible addbutton
in the line (e.getSource == addbutton)

also can not resolve symbol
variable rs ( which is my Resultset that i have created in my code).

can any body help in solving my problem to retrieve and display the values from the table to the textfields.

Thanks in advance.

code starts:
============

[ August 09, 2007: Message edited by: Gregg Bolinger ]
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

It's all about the scope. addbutton is only accessible in the sample1() method. And it's pretty much the same issue with your ResultSet object.
[ August 09, 2007: Message edited by: Gregg Bolinger ]

GenRocket - Experts at Building Test Data
Sireesha ikkurthi
Greenhorn

Joined: Nov 17, 2005
Posts: 7
Thanks for your reply, can you give the exact code for getting the output, as i altered my code and tried, but getting the same error.

Thanks
Shrikanth Nekkanti
Ranch Hand

Joined: Jul 12, 2007
Posts: 48

[ August 10, 2007: Message edited by: Shrikanth Nekkanti ]
Sireesha ikkurthi
Greenhorn

Joined: Nov 17, 2005
Posts: 7
i did not understand what you are trying to say
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem with my jdbc/swing code