public void updatePageTitle int checkLinkId String pageTitle PreparedS

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
//==============================================================
public void updatePageTitle(int checkLinkId,String pageTitle){
PreparedStatement checkLink=null;
try{
this.getConnection();
checkLink=this.conn.prepareStatement("UPDATE LINKS SET "+
"LINKS.PAGE_TITLE=SUBSTR(?,1,100) WHERE"+
"LINKS.ID=?");
checkLink.setString(1, pageTitle);
checkLink.setInt(2, checkLinkId);
checkLink.execute();
checkLink.close();
this.conn.commit();
} catch (ClassNotFoundException e) {
e.printStackTrace();
} catch (SQLException e) {
e.printStackTrace();
}
}
//==============================================================