File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes scanner variables into object for insertion into database. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "scanner variables into object for insertion into database." Watch "scanner variables into object for insertion into database." New topic
Author

scanner variables into object for insertion into database.

paulio macmurray
Greenhorn

Joined: Oct 26, 2009
Posts: 9
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

Joined: Oct 26, 2009
Posts: 9
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

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: scanner variables into object for insertion into database.