Archive for the ‘hibernate’ Category



结合《深入浅出hibernate》 ORM ( Object/Relation Mapping–对象/关系数据库映射 ) 主要面向的是MVC的M层,是业务逻辑和数据逻辑关联紧密部分,也就是持久层部分 耦合:即事务之间的关联关系,解耦合:降低两者的关联关系 程序一: import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; public class update_msg {    public boolean update_msg_do(String id,String amount) {     Statement stmt=null;     ResultSet rts=null;     Connection con=null; try{  Class.forName(“org.gjt.mm.mysql.Driver”).newInstance();    con=DriverManager.getConnection(“localhost”,”qk31″,”test”);   String updateSQL=”update msg set amount=’”+amount+”‘ where id=’”+id+”‘”;       stmt=con.createStatement();       return stmt.executeUpdate(updatesql); [...]


About this blog

QK31欢迎你的到来.

Photostream

search_extends

 

2010年九月
« 八    
 12345
6789101112
13141516171819
20212223242526
27282930  

36
Unique
Visitors
Powered By Google Analytics

分类目录

标签云