¶ÁÈ¡oracleÖÐblog×Ö¶Î
Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
String URL=dbmes.url;
Connection con = DriverManager.getConnection(URL,dbmes.usrname,dbmes.pwd);
try{
// ×¼±¸Óï¾äÖ´ÐжÔÏó
String bh=request.getParameter("dwmc");
Statement stmt = con.createStatement();
String sql = "select tp1 from HJ_ZDQY_TAB where dwmc='"+bh+"'";
ResultSet rs = stmt.executeQuery(sql);
if (rs.next()) {
Blob tp1 = rs.getBlob("tp1");
long size1 = tp1.length();
if(size1<=0){
rs.close();
response.sendRedirect("../images/error.jpg");
}else{
byte[] bs1 = tp1.getBytes(1, (int)size1);
response.setContentType("image/jpeg");
response.getOutputStream().write(bs1);
rs.close();
}
}else {
rs.close();
response.sendRedirect("../images/error.gif");
}
}
finally{
con.close();
}
out.clear();
out=pageContext.pushBody();
Ïà¹ØÎĵµ£º
×÷Õß Haidong Ji ·Òë GoodKid
ÎÒÃǵ±ÖеĴ󲿷ÖÈ˹¤×÷ÔÚÒ»¸öµ¥Ò»µÄ RDBMS ϵͳÖУ¬Èç MSSQL, Oracle, or IBM DB2¡£È»¶ø£¬ÎÒÃÇÈÕÒæ¸Ð¾õµ½£¬ÎÒÃÇÕý´¦ÓÚ²»Í¬µÄÊý¾Ý¿â»·¾³µ±Öв¢ÇÒÐèÒª½â¾öÊý¾ÝµÄ»¥ÓÃÐÔÎÊÌâ¡£
¾¡¹ÜÖ÷ÒªµÄ RDBMS ³§ÉÌÊÔͼȥ×ñѹØÏµÊý¾Ý¿âÄ£ÐÍÔÀí£¬²¢ÇÒÓ÷dz£Ð¡µÄ²îÒìȥʵÏÖËüÃÇ¡£ÁíÍ⣬¼¸ºõÖ÷ÒªµÄ ......
¼òµ¥ÃèÊöÒ»ÏÂÔÚwindowsµÄͬһÓû§Ï£¬°²×°OracleµÄ9i¡¢10gºÍ11gµÄ·½·¨¡£
OracleÔÚwindowsƽ̨ϵݲװÊÇËùÓÐÆ½Ì¨ÖÐ×î¼òµ¥µÄ£¬»ù±¾Éϲ»ÐèÒª½øÐÐÈκζîÍâµÄ´¦Àí¾Í¿ÉÒԳɹ¦µÄ°²×°£¬¿ÉÒÔ˵ûÓÐʲô¼¼Êõº¬Á¿¡£
²»¹ýÔÚͬһ̨»úÆ÷µÄͬһ¸öÓû§ÉÏͬʱ°²×°Á½¸ö²»Í¬°æ±¾µÄÊý¾Ý¿â¾ÍÐèÒªÒ»¶¨µÄ¼¼ÇÉÁË¡£ÕâÀï¼òµ¥ÃèÊöÒ»ÏÂÔÚͬʱ ......
package cn.edu.bit.test;
import java.sql.*;
public class Jdbc {
public static void main(String[] args)
{
try{
Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
System.out.p ......
PB×Ô´øµÄREPLACEÓï¾äÓÃ×Å×ÜÓÐЩ²»Ï°¹ß¡£½ñÌìͬÊÂÔÚ×öÊý¾ÝÇ¨ÒÆÖУ¬Óõ½Ìæ»»¹¦ÄÜ£¬¸ù¾Ý²»Í¬µÄµÇ¼Óû§£¬Ñ¡Ôñ¸ÃÓû§ÏÂµÄ±í¡£ËùÒÔ£¬ÎÒ¾ÍÓÃORACLEµÄº¯ÊýÀ´ÊµÏÖËü¡£Æäʵͦ¼òµ¥µÄ£¬¾ÍÊÇÒ»¸öPB¶¯Ì¬SQLÓï¾äµÄÀý×Ó¶øÒÑ¡£ÏÂÃæÊǸöÀý×Ó£¬SQLÓï¾ä×ÔÒÑÆ´×°ºÃ¡£×¢ÒâÆ´×°µÄSQLÓï¾äĩβ²»ÒªÏ°¹ßµÄ¼Ó“£» ......
½ñÌì¿´µ½Ò»Æª¹ØÓÚORA_ROWSCNµÄÎÄÕ£¬ËäÈ»¼ò¶Ì£¬Ã»ÓÐʲôʵÀý£¬µ«ÊÇÒѾ°ÑORA_ROWSCN´ó¸ÅÊÇÔõô»ØÊ½éÉÜÇå³þÁË¡£¼Ç¼һÏ¡£
=================================================================================
ĬÈϵÄÇé¿öÏ£¬Ã¿¸ö¿éÖÐËùÓеļǼµÄORA_ROWSCN¶¼ÊÇÏàͬµÄ£¬µ±¿éÖÐÈÎÒâÒ»Ìõ¼Ç¼·¢Éú¸Ä±äµÄÇé¿öÏ£¬¿éÖÐËùÓм ......