Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

java²Ù×÷oracleÊý¾Ý¿â

 package com.chinacache.boss.queryservice.service.impl;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import com.chinacache.boss.queryservice.exception.BusinessException;
import oracle.sql.ArrayDescriptor;
public class Main {
public static void main(String[] args) throws Exception {
Connection conn = null;
PreparedStatement pstmt = null;
java.sql.Array sqlArray = null;
conn = getOracleConnection();
// For oracle you need an array descriptor specifying
// the type of the array and a connection to the database
// the first parameter must match with the SQL ARRAY type created
ArrayDescriptor arrayDescriptor = ArrayDescriptor.createDescriptor(
"CHAR_ARRAY", conn);// CREATE OR REPLACE TYPE CHAR_ARRAY AS table OF VARCHAR2(255)
// then obtain an Array filled with the content below
String[] content = { "5137", "V2", "V3", "V4" };
sqlArray = new oracle.sql.ARRAY(arrayDescriptor, conn, content);
pstmt = conn.prepareStatement(""
+ "select * "
+ "from bandwith_area_test t where t.channel_id in (select * from the (select cast(? as CHAR_ARRAY) from dual)) and t.area_id = ?" + "and t.day >= ? and t.day <= ? order by t.day");
Date start = null;
Date end = null;

try {
SimpleDateFormat df = new SimpleDateFormat("yyyyMMddHHmm");
start = df.parse("200907011000");
end = df.parse("200907012000");
} catch (ParseException e) {
e.printStackTrace();
throw new BusinessException(e.getMessage());
}

pstmt.setArray(1, sqlArray);
pstmt.setString(2, "9050");
pstmt.setDate(3, new java.sql.Date(start.getTime()));
pstmt.setDate(4, new java.sql.Date(end.getTime()));
int rowCount = pstmt.executeUpdate();
System.out.println("rowCount=" + rowCount);
System.out.println("--Demo_PreparedStatement_SetArray end--");
pstmt.close(


Ïà¹ØÎĵµ£º

Sun Java Wireless Toolkit 2.3 betaÐÂÔö¹¦ÄÜ


Ô­Îijö´¦£ºhttp://developers.sun.com/techtopics/mobility/midp/articles/wtk23beta/
 
       Sun Java Wireless ToolkitÔ½À´Ô½ºÃ£¬2.3beta°æ±¾Ôö¼ÓÁ˶ÔÓÚÈýÖÖеÄAPIµÄÖ§³Ö£º
l         The Security and Trust Services APIs (SATSA, ......

JAVA¾²Ì¬·½·¨µÄͬ²½ÎÊÌâ~~~~~~~~~~~~~

Ò»Ö±±»Í¬²½¸ãµÃÔÎͷתÏò£¬½ñÌìÓöµ½ÁËҪд¾²Ì¬·½·¨£¬×ܵ£ÐĻ᲻»áÓÐͬ²½ÎÊÌ⣬½á¹û¿´ÁËÒÔÏÂһϯ»°£¬»íÈ»¿ªÀÊ~~
Every method of java will have a stack, and every invokation on that
method will have it's own 'stack frame'. So the locale data of one
method invokation will not affect others.
Please do not c ......

javaÓ¦ÓÃÔ´ÂëºÃÍøÖ·

 StrutsME Ò»¸öÇáÁ¿¼¶µÄÐòÁл¯Ð­Ò飬ʹJ2ME¿Í»§¶ËÄܵ÷ÓÃStruts WebÓ¦ÓóÌÐò¡£
http://www.strutsme.org/
JsonME ÇáÁ¿¼¶ÊµÏÖJ2ME Json¡£
http://www.json.org/java/org.json.me.zip
MicroLog ÇáÁ¿¼¶µÄLOG
http://microlog.sourceforge.net/snapshot
Mobile Ajax for Java ME °üÀ¨ÁËXmlHttpRequest£¬jsonµÄÒ ......

Java ¾²Ì¬´úÀíºÍ¶¯Ì¬´úÀí

 
Java ¾²Ì¬´úÀíºÍ¶¯Ì¬´úÀí
http://kuangbaoxu.javaeye.com/blog/192804
¹Ø¼ü×Ö: ¾²Ì¬´úÀíÓ붯̬´úÀí
1. ´úÀíģʽÖ÷ÒªÓÐÁ½ÖÖ£º¾²Ì¬´úÀíºÍ¶¯Ì¬´úÀí 
2. ¾²Ì¬´úÀí£º 
±ÈÈçÒªÔÚÊä³ö“HelloWorld”ǰ´òÓ¡Ò»¸ö×Ö·û´®“Welcome” 
A:Ïȶ¨ÒåÒ»¸ö½Ó¿ÚÀà 
Java´úÂë 
pac ......

Java Filter¹ýÂËÆ÷ʹÓÃ

±¾ÎÄÀ´×ÔCSDN²©¿Í£¬×ªÔسö´¦£ºhttp://blog.csdn.net/royaki/archive/2009/05/07/4159279.aspx
 1¡¢½¨Á¢Ò»¸öServlet²¢ÇÒʵÏÖFilter½Ó¿Ú
¸ÃÀàÐèҪʵÏÖFilter½Ó¿ÚÖеÄinit()   doFilter()    destory()·½·¨
ÆäÖÐinit()·½·¨×Ô¶¯ÔÚÏîÄ¿Æô¶¯µÄʱºò¼ÓÔØ£¬doFilter()ÔÚµ÷ÓÃxmlÅäÖõÄ·¾¶ÊǼÓÔØ£¬d ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ