jMighty - Java數據庫操作框架
jMighty是一個簡單并且強大的數據庫操作框架和連接池管理類庫。易于使用,擁有較高的性能,能夠快速成操作數據庫。
// create connection pool
JFunDBPool pool = new JFunDBPool();
pool.open("jdbc:mysql://localhost/mytestdb","root","",5,10,100); // insert two rows with transaction
try
{
db.beginTransaction();
HashMap fieldValues = new HashMap();
fieldValues.put("A",1);
fieldValues.put("B","stam123");
fieldValues.put("C",new Date());
db.insert("tests",fieldValues);
fieldValues.put("A","2");
db.insert("tests",fieldValues);
db.commitTransaction();
}
catch(Exception e)
{
db.rollbackTransaction();
}</pre> <p><strong>項目主頁:</strong><a href="http://www.baiduhome.net/lib/view/home/1350377367086" target="_blank">http://www.baiduhome.net/lib/view/home/1350377367086</a></p>
本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!