oracleµ÷ÓÃjava³ÌÐòÁ¬sqlserver2005
1¡¢ÔÚoracleµÄsys-sysdbaϵǽ
дһ¸öjava source³ÌÐòÁ´½Ósqlserver2005£º
create or replace and compile java source named test as
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
public class excutesql1
{
public static String entry(String str1,String str2) {
String driverName = "com.microsoft.sqlserver.jdbc.SQLServerDriver";
// ¼ÓÔØjdbcÇý¶¯
String a = "0";
String dbURL = "jdbc:sqlserver://localhost:1433;DatabaseName=wb"; // Á´½ÓÊý¾Ý¿â·þÎñºÍÇý¶¯sample
String userName = "sa"; // ̞
String userPwd = "giap"; // ÃÜÂë
Connection dbConn;
try {
a = "1";
Class.forName(driverName);
dbConn = DriverManager.getConnection(dbURL, userName, userPwd);
String sql = "insert into ry_jbxx (RYBH,XM) values ('" + str1
+ "','" + str2 + "')";
PreparedStatement pstmt = dbConn.prepareStatement(sql);
pstmt.addBatch();
pstmt.executeBatch();
a = "2";
} catch (Exception e) {
e.printStackTrace();
a = "error";
&n
Ïà¹ØÎĵµ£º
1.¸ÅÊö
JSPÊÇÒ»ÖÖʵÏÖÆÕͨ¾²Ì¬HTMLºÍ¶¯Ì¬HTML»ìºÏ±àÂëµÄ¼¼Êõ¡£
JSP×îÖջᱻת»»³É±ê×¼µÄServlet£¡£¡£¡
JSPÉè¼ÆµÄÄ¿µÄÔÚÓÚ¼ò»¯±íʾ²ãµÄ±íʾ¡£
JSPÒ³ÃæµÄÆäËû³É·ÖÖ÷ÒªÓÐÈçÏÂÈýÖÖ£º
½Å±¾ÔªËØ
Ö¸Áî
¶¯×÷
ÀýÈ磺
<%@ page contentType="text/html;charset=gb2312" %>
<%@ page import="java.util.*& ......
package thread.lock;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
import java.util.concurrent.locks.ReentrantReadWriteLock;
/**
* @file_name ReadAndWriteLockDemo.java
* @description ¶ÁÐ ......
¡¡1¡¢Ê¹ÓÃjava.util.ResourceBundleÀàµÄgetBundle()·½·¨
ʾÀý£º
String name = "logging"; // the logging.properties file in src root folder
ResourceBundle rb = ResourceBundle.getBundle(name,Locale.getDefault());
// test the rb
String propertyKey = "xxx";
System.out.println(rb.getString(propert ......
ÎÒÏÖÔÚÒѾ´óËÄÁË£¬Ñ§µÄÊÇÈí¼þרҵ£¬ÎÒ±ØÐë³ÐÈÏÎÒÃÇѧУµÄÈí¼þרҵºÜ²»ºÃ£¬ËùÒԴ󲿷ÖÒª¿¿×Ô¼º¡£
ÒÔÇ°´ÓÀ´Ã»Ð´¹ý²©¿Í£¬Õâ´ÎÔÚÕâÀ↑²©¾ÍÊÇÏëͨ¹ýcsdn½áʶ¸ü¶àµÄѧϰJAVAµÄÅóÓÑ£¬ÎÒÉîÖª×Ô¼ºµÄJAVA¹¦µ×Éõdz£¬ËùÒÔÖ»ÓÐ×Î×β»¾ëµÄÏ°£¬ºÍ²»ÑáÆä·³µÄ·¢ÎʲÅÄÜʹ×Ô¼ºÇ¿´ó¡£
×î½üÎÒÒ²´ÓÍøÉ ......
import java.awt.BorderLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JButton;
import javax.swing.JFrame;
import j ......