Topic: SQLServer这样连接不行吗?要用JDBC-ODBC? |
Print this page |
1.SQLServer这样连接不行吗?要用JDBC-ODBC? | Copy to clipboard |
Posted by: BluEmOoN Posted on: 2004-05-18 16:35 Class.forName( "com.microsoft.jdbc.sqlserver.SQLServerDriver" ); cn = DriverManager.getConnection( "jdbc:microsoft:sqlserver://MyDbComputerNameOrIP:1433;databaseName=master", sUsr, sPwd ); 还有 我改成JDBC-ODBC后怎么任何密码都可以连 注:本机服务器 |
2.Re:SQLServer这样连接不行吗?要用JDBC-ODBC? [Re: BluEmOoN] | Copy to clipboard |
Posted by: ljh_1997 Posted on: 2004-05-26 10:55 最后要加上“;” cn = DriverManager.getConnection( "jdbc:microsoft:sqlserver://MyDbComputerNameOrIP:1433;databaseName=master;", sUsr, sPwd ); |
3.Re:SQLServer这样连接不行吗?要用JDBC-ODBC? [Re: BluEmOoN] | Copy to clipboard |
Posted by: ljh_1997 Posted on: 2004-05-26 11:04 我开始试也是不行,后来在URL末要加上“;”就OK了 Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver"); Connection conn = DriverManager.getConnection("jdbc:microsoft:sqlserver://127.0.0.1:1433;DatabaseName=StoreOnline;User=sa;Password=**;"); |
4.Re:SQLServer这样连接不行吗?要用JDBC-ODBC? [Re: BluEmOoN] | Copy to clipboard |
Posted by: NUAA_SG Posted on: 2004-05-28 13:34 多谢多谢!小弟这些天正为这个问题困扰呢!刚发了帖子就发现这里有一篇类似的,谢谢楼主,谢谢各位回帖的,呵呵 |
Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1 客服电话 18559299278 客服信箱 714923@qq.com 客服QQ 714923 |