paulio macmurray

+ Follow
since Oct 26, 2009
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by paulio macmurray

Hi all,

I have the following so far, but could do with some help to get the syntax correct.

9 years ago
Hi Thanks for the response.

The pseudo code i wrote was.

1. user selects menu item (eg add book) (which i have)
2. the user inputs data requested via scanner class (which i have)
3. the data is displayed and user asked if they wish to submit.(which i have)
4. If yes, the data is stored (which i have) and the user is returned to the menu (which im stuck with)
5. If no, the user is returned to the menu (which im stuck with)

I agree that i need an exit button, which i have since found, but my brains given up on me
9 years ago

The following code works, but after an action is complete the program ends, but i dont want it to do that, i want the user to be returned to the menu.

Im fairly new with it, and im pretty sure i need a while loop, but i have no idea how to impliment it.

Here is my code so far

9 years ago
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

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
Hi All,

Just a note to let you know i managed to get the script to work, but only by dumping the connection file in the same directory as the java file, and then javac ing it in a command prompt.

Is there anyway to avoid this in netbeans?

Hi All,

Thanks for the posts.

Im also convinced that the issue is with the class path.

I have tried the following in the mac terminal:

java -cp /users/paulwhite/NetBeansProjects/bin/drivername.jar

but to no avail

Can you offer any advice as to how i can do this?

Thanks for the response.

the error shown is :Exception: com.mysql.jdbc.Driver

i also made a slightly different script which is below. The error message in that is my own "Cannot connect to database"

Hi all,

Im very puzzled.

I have a mac, and im trying to connect to mysql on localhost with java, however, it wont, and ive been good and followed the rules, but it wont work :-(