java封装数据库的类 java连接Sql2003数据库的封装类如何写 啊 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 public class Connecter { string driver="com.microsoft.jdbc.sqlserver.SQLServerDriver"; string URL="jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=huitong"; string username="sa"; string password="dellman";Connection connection = null; try{ class.forName(driver); } catch (ClassNotFoundException e) { e.printStackTrace(); } public Connection getConnection(){ try { connection = DriverManager.getConnection(URL,username,password); } catch (SQLException e) { e.printStackTrace(); } return connection; }} java插入排序 java注册邮箱激活问题 在linux环境下 centos 5.5配置Tomcat,配置好的用户名和密码不能访问 invalid project specified Map 怎么用递归的方式 进行转换 #springBind的用法? 使用EJB问题! == 提示找不到jar包,各种方法都试了,高手进来救命 == 淘宝JAE tomcat 在EClips时启动出错,请大神指点 springtest MockMvc判断返回json值的包(高分) 初学struts2求助 JSP翻页问题
string driver="com.microsoft.jdbc.sqlserver.SQLServerDriver";
string URL="jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=huitong";
string username="sa";
string password="dellman";
Connection connection = null;
try{
class.forName(driver);
}
catch (ClassNotFoundException e)
{
e.printStackTrace();
}
public Connection getConnection()
{
try
{
connection = DriverManager.getConnection(URL,username,password);
}
catch (SQLException e)
{
e.printStackTrace();
}
return connection;
}
}