• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

problem with my jdbc/swing code

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Sireesha ikkurthi
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

[ August 10, 2007: Message edited by: Shrikanth Nekkanti ]
 
Sireesha ikkurthi
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i did not understand what you are trying to say
reply
    Bookmark Topic Watch Topic
  • New Topic