"com.microsoft.jdbc.sqlserver.SQLServerDriver";
来源:互联网 发布:java导出pdf文件 编辑:程序博客网 时间:2024/05/16 07:32
import java.sql.Connection;import java.sql.DriverManager;public class TestCenter {public static void main(String[] args) {String driverName = "com.microsoft.jdbc.sqlserver.SQLServerDriver";String dbURL = "jdbc:microsoft:sqlserver://192.168.1.109:5090; DatabaseName=anorder";String userName = "sa";String userPwd = "123";try {Class.forName(driverName);Connection conn = DriverManager.getConnection(dbURL, userName, userPwd);System.out.println("Connection Successful!");java.sql.Statement stmt = conn.createStatement();java.sql.ResultSet rs = stmt.executeQuery("select getdate() as date ");//if (rs.next()) System.err.println("@@@ >> "+rs.getString(1));java.sql.ResultSetMetaData rmd = rs.getMetaData();int cnt = rmd.getColumnCount()+1;while (rs.next()){for (int i=1; i<cnt; i++) System.err.print("\t "+rmd.getColumnName(i)+"["+i+"]="+rs.getString(i));System.err.println( );}rs.close();stmt.close();conn.close();conn = null;System.out.println("Connection down ~ !");} catch (Exception e) {e.printStackTrace();}} }
- "com.microsoft.jdbc.sqlserver.SQLServerDriver";
- Cannot load JDBC driver class 'com.microsoft.sqlserver.jdbc.SQLServerDriver'
- Cannot load JDBC driver class 'com.microsoft.sqlserver.jdbc.SQLServerDriver'
- Tomcat7 registered the JDBC driver [com.microsoft.sqlserver.jdbc.SQLServerDriver]
- java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver
- jbuilder中的Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");问题
- java lang classnotfoundexception com microsoft jdbc sqlserver sqlserverdriver
- java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver
- java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver
- java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver
- java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver
- java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver
- java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver
- MyEclipse 'com.microsoft.sqlserver.jdbc.SQLServerDriver' Not Found
- java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver
- java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver
- java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver
- Could not load driverClass com.microsoft.sqlserver.jdbc.SQLServerDriver
- 杭电1021 Fibonacci Again
- Error creating bean with name 'dataSource' defined in ServletContext resource
- window.print()的使用
- Java Servlet实现同一账号后登陆挤掉前一个登陆(类似QQ)
- 通过 Informix 系统表监控和优化数据库
- "com.microsoft.jdbc.sqlserver.SQLServerDriver";
- Key down, key up, key press 的区别
- 提高rails new时bundle install运行速度
- Oracle CASE WHEN 用法介绍
- jquey >>spring >>portlet >>>处理url中有中文参数的问题
- linux网络编程多进程并发服务器
- 根据表一和表二写出查询结果如表三的sql语句
- 网页抓取内容
- Linux chmod命令