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

javaÓë´æ´¢¹ý³Ì

Ò»£ºÎÞ·µ»ØÖµµÄ´æ´¢¹ý³Ì
´æ´¢¹ý³ÌΪ£º
CREATE OR REPLACE PROCEDURE TESTA(PARA1 IN VARCHAR2,PARA2 IN VARCHAR2) AS
BEGIN
   INSERT INTO HYQ.B_ID (I_ID,I_NAME) VALUES (PARA1, PARA2);
END TESTA;
È»ºóÄØ£¬ÔÚjavaÀïµ÷ÓÃʱ¾ÍÓÃÏÂÃæµÄ´úÂ룺
package com.hyq.src;
import java.sql.*;
import java.sql.ResultSet;
public class TestProcedureOne {
 public TestProcedureOne() {
 }
 public static void main(String[] args ){
    String driver = "oracle.jdbc.driver.OracleDriver";
    String strUrl = "jdbc:oracle:thin:@127.0.0.1:1521: hyq ";
    Statement stmt = null;
    ResultSet rs = null;
    Connection conn = null;
    CallableStatement cstmt = null;
    try {
      Class.forName(driver);
      conn = DriverManager.getConnection(strUrl, " hyq ", " hyq ");
      CallableStatement proc = null;
      proc = conn.prepareCall("{ call HYQ.TESTA(?,?) }");
      proc.setString(1, "100");
      proc.setString(2, "TestOne");
      proc.execute();
    }
    catch (SQLException ex2) {
      ex2.printStackTrace();
    }
    catch (Exception ex2) {
      ex2.printStackTrace();
    }
    finally{
      try {
        if(rs != null){
          rs.close();
          if(stmt!=null){
            stmt.close();
          }
          if


Ïà¹ØÎĵµ£º

sql 2005 ´æ´¢¹ý³Ì·ÖÒ³ java ´úÂë

 create PROCEDURE pagelist
@tablename nvarchar(50),
@fieldname nvarchar(50)='*',         
@pagesize int output,--ÿҳÏÔʾ¼Ç¼ÌõÊý
@currentpage int output,--µÚ¼¸Ò³
@orderid nvarchar(50),--Ö÷¼üÅÅÐò
@sort int,--ÅÅÐò·½Ê½£¬1±íʾÉýÐò£¬0±íʾ½µÐòÅÅÁÐ ......

Java½øÖÆת»»

¹Ø¼ü×Ö: java ½øÖÆת»»
Ê®½øÖÆת³ÉÊ®Áù½øÖÆ£º
Integer.toHexString(int i)
Ê®½øÖÆת³É°Ë½øÖÆ
Integer.toOctalString(int i)
Ê®½øÖÆת³É¶þ½øÖÆ
Integer.toBinaryString(int i)
Ê®Áù½øÖÆת³ÉÊ®½øÖÆ
Integer.valueOf("FFFF",16).toString()
°Ë½øÖÆת³ÉÊ®½øÖÆ
Integer.valueOf("876",8).toString()
¶þ½øÖ ......

javaÔËÐÐÍⲿ³ÌÐò

public class RunExtraProgram {
 /**
  * @param args
  */
 public static void main(String[] args) {
  // TODO Auto-generated method stub
  try {
   Runtime.getRuntime().exec("D:\\Program Files\\TTPlayer\\TTPlayer.exe");
  } catc ......

java ²åÈëÅÅÐòºÍðÅÝÅÅÐòÑо¿

½ñÌ칫˾²»ÊǺÜ棬¾Í»Ø¹ËÁËÒ»ÏÂÒÔÇ°µÄðÅÝÅÅÐòºÍ²åÈëÅÅÐò
package chen;
import java.util.Date;
public class Sort {
 /**
  * ðÅÝÅÅÐò
  * @param list
  * @author chenpengye
  */
 public void sort(int[] list){
  long begain=new Date().getTime();
 &n ......

³£ÓÃJava Date·½·¨

1.¼ÆËãijһÔ·ݵÄ×î´óÌìÊý
Calendar time=Calendar.getInstance();
time.clear();
time.set(Calendar.YEAR,year); //year Ϊ int
time.set(Calendar.MONTH,i-1);//×¢Òâ,Calendar¶ÔÏóĬÈÏÒ»ÔÂΪ0          
int day=time.getActualMaximum(Calendar ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ