| Author |
dsn less connections
|
Bhupendra Malviya
Greenhorn
Joined: Oct 01, 2003
Posts: 15
|
|
Hi, I am new to jdbc programming. Can you please tell me how to make dsn less connection to major databases like SQL Server, Oracle etc. Thanking u all in advance Bhupendra
|
 |
Gowher Naik
Ranch Hand
Joined: Feb 07, 2005
Posts: 643
|
|
i am also trying to connect sql server with java application.i got somthing from net but is donot work in muy code,i think it need some kind of driver. Properties p=new Properties(); p.put("test","DRIVER={SQL Server};ServerName=sw8;UID=wh1;PWD=wh1"); String sConnect =new String("jdbc:sw8://192.168.0.11/,"); Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); con = DriverManager.getConnection(sConnect,p);
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 26192
|
|
Gowher, Welcome to JavaRanch! Yes, you need a driver. It comes with your database. As an alternative, you can download the JDBC driver from Microsoft. Also, note that the original question is a year and a half old. It's ok to start a new thread in the future.
|
[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
|
 |
 |
|
|
subject: dsn less connections
|
|
|