Invalid Oracle URL specified error

Hi there,

I am trying to get connection to a remote Oracle database using the following string:

String url ="jdbc:oracle:oci7:@(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = devsvr)(PORT = 1521))(CONNECT_DATA = (SID = eu)))";

String user= "user";

String pswd = "user";

Connection conn = DriverManager.getConnection(url,user,pswd);

I always got such an error, said:

java.sql.SQLException: Invalid Oracle URL specified

Could anybody tell me what's wrong with my code?

Thanks a lot.

[559 byte] By [mike_nu] at [2007-9-26 1:34:08]
# 1
Mike, I'm not sure if this will work with Oracle 7, but the way I do it for oracle 8:jdbc:oracle:oci8:@<ip/servername>:port:SIDHTH,--Yonah
yonah at 2007-6-29 2:16:50 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 2
Well the error says that something is wrong with the connection string.Some guesses....-Try using the IP address rather than the host name.-Try removing the spaces.
jschell at 2007-6-29 2:16:50 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...