Re: about connect to sql 2000
Jen <[email protected]>
| Newsgroups | gmane.comp.java.sun.servlet |
|---|---|
| Message-ID | <[email protected]> |
try to use: Driver driver = Class.forName(...); COnnection conn = driver.connect(...); --- hxd han <[email protected]> wrote: --------------------------------- Dear all; I want to use the mssql jdbc to connent to sql2000; as: Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver"); Connection conn = DriverManager.getConnection ("jdbc:microsoft:sqlserver://a18:1433","sa",""); I get the exception : java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket. at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source) at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source) at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source) at com.microsoft.jdbc.sqlserver.tds.TDSConnection.<init>(Unknown Source) at com.microsoft.jdbc.sqlserver.SQLServerImplConnection.open(Unknown Source) at com.microsoft.jdbc.base.BaseConnection.getNewImplConnection(Unknown Source) at com.microsoft.jdbc.base.BaseConnection.open(Unknown Source) at com.microsoft.jdbc.base.BaseDriver.connect(Unknown Source) tks --------------------------------- MSN 8 helps ELIMINATE E-MAIL VIRUSES. Get 2 months FREE*.___________________________________________________________________________To unsubscribe, send email to [email protected] and include in the bodyof the message "signoff SERVLET-INTEREST".Archives: http://archives.java.sun.com/archives/servlet-interest.htmlResources: http://java.sun.com/products/servlet/external-resources.htmlLISTSERV Help: http://www.lsoft.com/manuals/user/user.html __________________________________ Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo. http://search.yahoo.com ___________________________________________________________________________ To unsubscribe, send email to [email protected] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html