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
Ïà¹ØÎĵµ£º
ÔÚ¡¶JDBC Driver For SQL2000/2005/2008
¡·Ò»ÎÄÖУ¬ÑûÔ½éÉÜÁËÈçºÎÏÂÔØ²¢Ê¹ÓÃjdbcÁ¬½ÓSQL Server,
½ñÌìÓÐÈËÎÊÆð£¬ÈçºÎÒÔwindows¼¯³É·½Ê½Á¬½ÓSQL Server,Õâ¸öÒÔÇ°ÕæÃ»ÊÔ¹ý¡£
ÓÚÊÇ£¬´ò¿ªnetBeans²âÊÔÁËһϣ¬´úÂëÈçÏ£º
/*
* To change this template, choose Tools | Templates
* and open the template in the edit ......
windowsÉÏ´æÔÚ32bitµÄÏÞÖÆ£¬ÈçAIX¡¢HP UNIX µÈÓÐÃ÷È·µÄ64BIT OS and ORACLEµÄ°æ±¾£¬32bit oracle¿ÉÒÔ×°ÔÚ64bit os ÉÏ£¬64 bit oracle²»ÄÜ×°ÔÚ32 bit OSÉÏ
oracleÊÇ64bit or 32 bit,32bit ͨ³£ SGAÓÐ 1.7G µÄÏÞÖÆ(ijЩOSµÄ´¦Àí»òÕßWINDOWSÉÏÓÐÌØ¶¨É趨¿ÉÒÔÖ§³Öµ½2GÒÔÉÏÉõÖÁ´ïµ½3.7G
ÈçºÎ²é³öǰ̨ÕýÔÚ·¢³öµÄsqlÓï¾ä:
sele ......
JAVA×¢ÊÍ·½·¨¼°¸ñʽ
1¡¢µ¥ÐÐ(single-line)--¶Ì×¢ÊÍ£º//……
µ¥¶ÀÐÐ×¢ÊÍ£ºÔÚ´úÂëÖе¥ÆðÒ»ÐÐ×¢ÊÍ£¬ ×¢ÊÍǰ×îºÃÓÐÒ»ÐпÕÐУ¬²¢ÓëÆäºóµÄ´úÂë¾ßÓÐÒ»ÑùµÄËõ½ø²ã¼¶¡£Èç¹ûµ¥ÐÐÎÞ·¨Íê³É£¬ÔòÓ¦²ÉÓÿé×¢ÊÍ¡£
×¢Ê͸ñʽ£º/* ×¢ÊÍÄÚÈÝ */
ÐÐÍ·×¢ÊÍ£ºÔÚ´úÂëÐеĿªÍ·½øÐÐ×¢ÊÍ¡£Ö÷ҪΪÁËʹ¸ÃÐд ......
Java Applet ÊÇÓÃJava ÓïÑÔ±àдµÄһЩСӦÓóÌÐò£¬ÕâЩ³ÌÐòÊÇÖ±½ÓǶÈëµ½Ò³ÃæÖУ¬ÓÉÖ§³ÖJavaµÄä¯ÀÀÆ÷£¨IE »ò Nescape£©½âÊÍÖ´ÐÐÄܹ»²úÉúÌØÊâЧ¹ûµÄ³ÌÐò¡£Ëü¿ÉÒÔ´ó´óÌá¸ßWebÒ³ÃæµÄ½»»¥ÄÜÁ¦ºÍ¶¯Ì¬Ö´ÐÐÄÜÁ¦¡£°üº¬AppletµÄÍøÒ³±»³ÆÎªJava-poweredÒ³£¬¿ÉÒÔ³ÆÆäΪJavaÖ§³ÖµÄÍøÒ³¡£
µ±Óû§·ÃÎÊÕâÑùµÄÍøÒ³Ê±£¬Ap ......
load-on-startupÔªËØÒ»°ãÊÇÅäºÏservletµÄÅäÖÃʹÓõÄ,load-on-startup ÔªËØÔÚwebÓ¦ÓÃÆô¶¯µÄʱºòÖ¸¶¨ÁËservlet±»¼ÓÔØµÄ˳Ðò£¬ËüµÄÖµ±ØÐëÊÇÒ»¸öÕûÊý¡£Èç¹ûËüµÄÖµÊÇÒ»¸ö¸ºÕûÊý»òÊÇÕâ¸öÔªËØ²»´æÔÚ£¬ÄÇôÈÝÆ÷»áÔÚ¸Ãservlet±»µ÷ÓõÄʱºò£¬¼ÓÔØÕâ¸öservlet ¡£Èç¹ûÖµÊÇÕýÕûÊý»òÁ㣬ÈÝÆ÷ÔÚÅäÖõÄʱºò¾Í¼ÓÔØ²¢³õʼ»¯ ......