Help for a newbee please!
From: Chris Hatton (chrishatton_at_blueyonder.co.uk)
Date: 12/15/04
- Next message: kaeli: "Re: Help for a newbee please!"
- Previous message: Ben Engbers: "Integrating iBatis and JTable?"
- Next in thread: kaeli: "Re: Help for a newbee please!"
- Reply: kaeli: "Re: Help for a newbee please!"
- Reply: klynn47_at_comcast.net: "Re: Help for a newbee please!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 15 Dec 2004 14:10:46 +0000
I'm having problems trying to connect to a remote mySQL db. I have have
got this working on localhost but can get it to work for my website db.
Can anyone point out problems with the code or general problems I shoudl
be looking out for?
protected Connection getConnection () throws Exception {
String url = "";
String userName = "";
String password = "";
try {
url = "jdbc:mysql://www.tattooplace.co.uk/tattoop_chatusers";
userName = "*******";
password = "*******";
Connection con = DriverManager.getConnection(url, userName,
password);
System.out.println("Connection established to " + url + "...");
return con;
} catch ( java.sql.SQLException e ) {
System.out.println("Connection couldn't be established to " + url);
throw ( e );
}
}
- Next message: kaeli: "Re: Help for a newbee please!"
- Previous message: Ben Engbers: "Integrating iBatis and JTable?"
- Next in thread: kaeli: "Re: Help for a newbee please!"
- Reply: kaeli: "Re: Help for a newbee please!"
- Reply: klynn47_at_comcast.net: "Re: Help for a newbee please!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]