• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

scanner variables into object for insertion into database.

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

In one class im using scanner to store information, such as forename, surname.

What im trying to do is take those variables, then create a new object and pass those variables into the object, which will then store in the database.

so scanner is

the following is me creating the new object, but the content is static, where i want it to be the variables, but if i replace PAUL with forename, it passes out.

this is my constructor
 
paulio macmurray
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all,

this is as far as i have got but

a) if i javac in cmd, i get 2 errors. its pointing at the N of telNumber, and the P of Personal, saying it cant find symbol.

b) i compile in netbeans, it asks for all the input, but then says "cant connect"

here is the code

 
reply
    Bookmark Topic Watch Topic
  • New Topic