Atitit DBSERVICEV4QB9 database query class Library V4 new features

Source: Internet
Author: User
Tags getmessage

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.