java存储过程的创建与调用
create or replace procedure updateProject is
begin
update project p set p.total_intend_gather =
(select sum(ig.gather_sum) from intend_gather ig where ig.project_number=p.project_number);
update project p set p.total_actual_gather =
(select sum(ag.gahter_sum) from actual_gather ag where ag.project_number=p.project_number);
update project p set p.total_invoice=
(select sum(invoice.invoice_sum) from invoice invoice
where invoice.intend_id in
(select ig.intend_id from intend_gather ig where ig.project_number=p.project_number));
end updateProject;
Session session = this.getSession();
Transaction tx =null;
try {
tx = session.beginTransaction();
Connection con = session.connection();
String procedure = "{call updateproject() }";
CallableStatement cstmt = con.prepareCall(procedure);
cstmt.executeUpdate();
tx.commit();
} catch (Exception e) {
tx.rollback();
}
相关文档:
测试环境:win2000+jdk1.4+jb2006
import java.io.*;
import java.util.Enumeration;
//import java.util.zip.*;
import org.apache.tools.zip.*;
public class Test {
//解压文件
public static void extZipFileList(String zipFileName, String extPlace) {
try {
  ......
String[] ips = ipValue.split("\\.");
String binaryVal = "";
for (int i = 0; i < ips.length; i++)
{
String binaryStr = Integer.toBinaryString(Integer.parseInt(ips[i]));
Integer times = 8 - binaryStr.length();
......
http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp
Categories of Java HotSpot VM Options
Standard options recognized by the Java HotSpot VM are described on the Java Application Launcher reference pages for Windows
, Solaris
and Linux
. This document deals exclusively wit ......
采用串口操作进行短信收发,是比较常见的一种方式.比如,很多群发软件,用的就是这种方法.
1.配置comm.jar.
Comm.jar是Sub实现底层串口操作的API,调用了本地的DLL文件,因为Java本身不具备直接访问硬件设置的能力,都是通过调用本地方法来实
现的.可以Java的官方网站下载.下载之后把其中Comm.jar包导入到工程的Classpath中,把 ......
现在UrlRewriter技术有两个技术平台的,一个就是在Java方向的,另一个就是.NET方向的。这次是Java方向的应用。
首先让我们了解它的工作原理,说白了它就是一个简单的过滤器(Filter),看看源码你就会很快的明白,它就是通过我们在jsp中常用的两个方法实现的forward(),sendRedirect().
下面我们就快速的为你的网站搭建U ......