用SQL语句怎样将多媒体文件插入到数据库中?????

解决方案 »

  1.   

    我知道是用BLOB字段保存,现在我机器上有一个视频文件,要存到数据库中,是用什么方法把它存到数据库中呢????那位高手能否说得详细一点!!!是用语句还是用函数???
      

  2.   

    如果你前台用的是vb,那可以参见帖子:
    http://expert.csdn.net/expert/topic/580/580137.xml
      

  3.   

    分别用blob和bfile的例子:
    grant create any directory to scott;
    grant create any library to scott;
    create or replace directory utllobdir as 'G:\oracle';
    create table bfile_tab (bfile_column BFILE);
    create table utl_lob_test (blob_column BLOB);set serveroutput on然后执行下面语句就将G:\oracle目录下的Azul.jpg存入到utl_lob_test 
    表中的blob_column字段中了。
    declare
       a_blob  BLOB;
       a_bfile BFILE := BFILENAME('UTLLOBDIR','Azul.jpg'); 
    begin
       insert into bfile_tab values (a_bfile)
         returning bfile_column into a_bfile;
       insert into utl_lob_test values (empty_blob())
         returning blob_column into a_blob;
       dbms_lob.fileopen(a_bfile);
       dbms_lob.loadfromfile(a_blob, a_bfile, dbms_lob.getlength(a_bfile));
       dbms_lob.fileclose(a_bfile);
       commit;
    end;
    /
    select dbms_lob.getlength(blob_column) from UTL_LOB_TEST;
      

  4.   

    如果用Delphi的Adoquery,应该怎样来做呢?????