Atitit dbservicev4qb9 database query class library v4 new features
V4 new Features
security features, shielding the executeupdate , using version v2
SQL Exception conversions, especially the Duplicateentryex Exception
Split meta Svs,sql ast SVS ...
public int executeupdatev2qb0 (String sql) throws Getconnex, Duplicateentryex, SQLException {
Connection Conn;
conn = getconnection ();
Create a queryrunner
Queryrunner Queryrunner = new Queryrunner (true);
int rzt = 0;
try {
Rzt = queryrunner.update (conn, SQL);
} catch (SQLException e) {
if (E.getmessage (). StartsWith ("Duplicate entry"))
{
throw new Duplicateentryex (E.getmessage (), E);
}
Throw e;
}
return rzt;
}
C:\0workspace\AtiPlatf_cms\WebRoot\rpt\rum.js
Example
function Page_Load ()
{
try{
var sql= "SELECT * from servers where id=1";
var dsl= " Com.attilax.ioc.Ioc4agent.getBean (Com.attilax.db.DbServiceV4qb9.class). Execsql (' $s $ ') ";
Dsl=dsl.replace ("$s $", SQL);
var jsbrj=new Atijsbridge ();
// jsbrj.method= "POST";
var para={};
PARA.DSL=DSL;
Jsbrj.exe (para,function (data) {
Console.log (data);
$ ("#content"). val (data);
var json=str2json (data);
var obj=json[0];
$ ("#u"). Text (Obj.onlinecount);
$ ("#r"). Text (Obj.roomcount);
});
Mycalljava ("Submitx", $ ("#title"). Val (), $ ("#content"). Val (), Dropids);
}catch (e)
{
Alert (e);
}
}
author:: Nickname :Old Wow's claws( Full Name::AttilaxAkbar Al Rapanui Attilaksachanui)
Kanji Name: Etila ( Ayron) , email:[email protected]
reprint Please indicate source: http://www.cnblogs.com/attilax/
Atiend
Atitit DbServiceV4qb9 database query class Library V4 new features