oracle BLOB´ó×ֶζÁд³öÏÖÎÊÌâ
ÏÂÃæÊÇÎÒÔÚÍøÉÏÕÒµÄBLOB¶Áд³ÌÐò£¬µ«ÊÇÒ»Ö±ÔËÐв»³öÀ´£¬ÓÐÒ»ÐÐ
blob = (BLOB)rst.getBlob(1);
Ò»Ö±±¨´í£¬Exception in thread "main" java.lang.UnsupportedOperationException
at sun.jdbc.odbc.JdbcOdbcResultSet.getBlob(JdbcOdbcResultSet.java:4386)
at blob.OracelBlobTest.writeBlob(OracelBlobTest.java:85)
at blob.OracelBlobTest.main(OracelBlobTest.java:149)
Çë¸ßÊÖÖ¸µãÒ»ÏÂ~~лл
package blob;
import oracle.sql.BLOB;
import java.sql.*;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.FileInputStream;
import java.io.FileOutputStream;
/**
* ×ܽ᣺
* 1.JDBCµÄAPI£ºjava.sql.Blob½Ó¿Ú£¬Ö»ÌṩÁËBLOBµÄ¶ÁÈ¡·½·¨£¬Ã»ÓÐÌṩдÈëµÄ·½·¨¡£
* 2.ORACELµÄAPI£ºoracle.sql.BLOBÊÇÒ»¸öÀ࣬ËüʵÏÖÁËjava.sql.Blob½Ó¿Ú£¬²¢ÇÒÌṩÁËÏòBLOBÖÐдÈëÊý¾ÝµÄ·½·¨
* 3.ÔÚÏòÊý¾Ý¿âÖвåÈëBLOBʱ£¬Ö»ÄÜÓÃORACELÌṩµÄAPI£ºoracel.sql.BLOB
* дÈëµÄ²½Ö裺1>²åÈëÒ»Ìõ¼Ç¼£¬ÆäÖÐBLOB×Ö¶ÎÓÃoracleµÄ¿Õº¯Êý£ºempty_blob()´úÌæ¡£
* 2>ÒÔ¼ÓËøµÄ·½Ê½¶ÁÈ¡¸Õ²åÈëµÄ¼Ç¼£¬
* 3>ÀûÓÃoracleµÄoracle.sql.BLOBµÄgetBinaryOutputStream()·½·¨»ñÈ¡BLOB×ֶεÄÊä³öÁ÷£¬ÏòÁ÷ÖÐдÈëÊý¾Ý
* 4>Óñ»Ð´ÈëµÄBLOBÊý¾Ý£¬¸üÐÂԼǼ
* 4.ÔÚ´ÓÊý¾Ý¿âÖжÁÈ¡BLOBʱ£¬¼È¿ÉÒÔʹÓÃjava.sql.Blob£¬Ò²¿ÉÒÔʹÓÃoracel.sql.BLOB
* ¶ÁÈ¡µÄ²½Ö裺1&
Ïà¹ØÎÊ´ð£º
<?php
getenv("ORACLE_HOME");
$conn=ocilogon("test","test","test_db");
if($conn)
echo success;
&nb ......
ÊÇÕâÑùµÄÎÒ×°ÁËһ̨2003µÄÐéÄâ»ú£¡
ÐéÄâ»úIP£º192.168.1.108
±¾»úIP£º192.168.1.100
ÎÒÔÚÐéÄâ»úÉÏ×°ÁËoracle 10G ,ÏÖÔÚÏë±àд¸ö³ÌÐò¶ÁÈ¡oracleÊý¾Ý¿âÀïµÄ¼Ç¼£¬
ÎÒÔÚ±¾»ú×°Á˸öoracle XE Cl ......
ÓÐÒ»±íÈçÏ£º
ID ÐÕÃû ¿ÆÄ¿ ³É¼¨
1 ÕÅÈý ÓïÎÄ 80 ......
ÂÒÂë²úÉúÊÇÓÉÓÚ¼¸¸ö×Ö·û¼¯Ö®¼äת»»²»Æ¥ÅäÔì³É£¬·ÖÒÔϼ¸ÖÖÇé¿ö£º£¨×¢£º×Ö·û¼¯Ö®¼äÈç¹û²»´æÔÚ×Ó¼¯¡¢³¬¼¯¶ÔÓ¦¹ØϵʱµÄÇé¿ö²»Ó迼ÂÇ£¬ÒòΪÕâÖÖÇé¿öÏÂ×Ö·û¼¯Ö®¼äת»»±Ø²úÉúÂÒÂ룩
1£©·þÎñÆ÷¶ËÊý¾Ý¿ ......
1.OracleÖÐÃèÊöµÄ¿Í»§¶ËÓ¦Óõ½µ×Ö¸µÄʲô?
2.OracleתÂëʱ,Èç¹û¿Í»§¶ËΪ×Ó¼¯(UASCII)·þÎñ¶ËΪ³¬¼¯(AL32UTF8).
ÄÇÑϸñµÄ½²ÊÇ×Ó¼¯×ª³¬¼¯, ¿ÉÒÔתµÄͨ.
²éѯµÄʱºò³¬¼¯×ª×Ó¼¯ÄDz»¾Í³öÎÊÌâÁËô?
Äĸö»Ø¸öÌ ......