Java Assistance

zizo911

Executive Member
Joined
Dec 24, 2010
Messages
9,414
Reaction score
322
Location
Cape Town
Good Morning MYBB, How are you?

I would like to know if it is possible if you can help me out with a little problem I am having.

I created a Database with Netbeans and also GUI Screens for a task which I am working on.
But I am unable to connect to the database as it says Invalid database address. But I have checked the address and it is correct.
I have attached the program in case you would like to have a look

Much Appreciated

Regards

https://www.dropbox.com/s/uf1j8rlphrnyvly/Phase 3.zip?dl=0
 
I can connect to and query the database, but I had to change the following line in the DBConnect class:

Connection conn = DriverManager.getConnection(host, uName, uPass);

to

Connection conn = DriverManager.getConnection(host);

It seems the blank uName and uPass were causing issues.
 
Okay, well, first thing. Start with verifying that the database is running on your machine. I see that the connect string is:
localhost:1527

Verify that the DB is up and running on that port.
Check that you can connect to it.
Also, verify your username and password, password is currently blank, and username is a space " "

Try write some simple tests, just create a class that uses your DBConnect class and tries to connect to the DB.
 
Top
Sign up to the MyBroadband newsletter
X