This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
Hi, I am using Microsoft JDBC Driver for connecting to SQL Server database. My connection always goes to Default database set in the SQL Server for the current user ('sa'). Can anyone please suggest me how to use a DSN with Microsoft JDBC Driver for connecting to SQL Server. Thanks RaviTadakamalla
Hrithik Roshan
Greenhorn
Joined: Dec 12, 2001
Posts: 23
posted
0
Originally posted by ravitadakamalla: Hi, I am using Microsoft JDBC Driver for connecting to SQL Server database. My connection always goes to Default database set in the SQL Server for the current user ('sa'). Can anyone please suggest me how to use a DSN with Microsoft JDBC Driver for connecting to SQL Server. Thanks RaviTadakamalla
hi, basically it depends on the which Driver u are trying to use and which dsn u r tyin to connect! double check++; use Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); and create a dsn using the default MS ODBC name it for example as Northwind; then ur code is like DriverManager.getConnection("jdbcdbc:Northwind", user, password "); hope this works!!! watch my new movie K3G Thanx