This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I want to connect to SQL 2000 database, I tried it with - Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection conn=DriverManager.getConnection("jdbc dbc:A"); Statement stmt=conn1.createStatement(); but its not working. Does anyone have the code to connect java to SQL 2000, the might be 4-5 line code ?
Try this: Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con; //establish the connection with the data source String url = "jdbc dbc:MyDataSource"; con = DriverManager.getConnection(url, "loginName" ,"password");