aspose file tools*
The moose likes Servlets and the fly likes can i connect to MS  sql server without creating a dsn Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "can i connect to MS  sql server without creating a dsn" Watch "can i connect to MS  sql server without creating a dsn" New topic
Author

can i connect to MS sql server without creating a dsn

Subbu Aswathanarayan
Ranch Hand

Joined: Jun 22, 2001
Posts: 73
hi all,
i was just wondring if i can connect to a MS sql server database without using a dsn using the JDBC-ODBC bridge, just as we do with other jdbc drivers.
any help is greatly appreciated.
Subbu
java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not fou
nd and no default driver specified
at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source)
at sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source)
at sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcConnection.initialize(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at msjdmc.main(msjdmc.java:16)


Subbu
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16061
    
  21

The jdbc-odbc bridge isn't generally recommended for "real-world" usage. It isn't optimized and it isn't considered thread-safe. Most DBMS vendors provide a native jdbc driver. Microsoft doesn't. There are a number of third-party ones available, though most will cost you.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: can i connect to MS sql server without creating a dsn