View Single Post
  #1 (permalink)  
Old 03-23-2008, 05:52 PM
subash subash is offline
Member
 
Join Date: Mar 2008
Posts: 1
subash is on a distinguished road
connection problem
Hi Friends this is my code to connect to database oracle10g but i am gettin error when java command the error is invalid oracle url specified can anybody solve this problem






import java.sql.*;
import java.lang.*;
import java.io.*;

public class condb
{
public static void main (String args[]) throws SQLException
{
try{
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection con=DriverManager.getConnection("jdbcracle:thin@//localhost:1521:XE","SYSTEM","tiger");
System.out.println("connected");
}
catch(Exception e)
{
System.out.println(e);
}
}
}
Reply With Quote
Sponsored Links