數據庫是oracle.這個問題困擾我很長時間的. 

解决方案 »

  1.   

    我請教過  nylp (混子刘)  ,他說delphi要升级ado组件。
    請問怎麼升级ado组件  ???  (我在用delphi 5+oracle 8.17)   謝謝, netlib(河外孤星) ,您貼出來吧!!
      

  2.   


    我的有一部分是用olecontainer的,这样写的
    var
    mslr,msda:tmemorystream;
    begin
        panel4.Enabled:=true;
        n15.Enabled:=true;
        mslr:=tmemorystream.Create;
        msda:=tmemorystream.Create;
        olecontainer1.SaveToStream(mslr);
        olecontainer2.SaveToStream(msda);
        clientdataset2.Edit;
        clientdataset2lr.LoadFromStream(mslr);
        clientdataset2lrda.LoadFromStream(msda);
        clientdataset2.fieldbyname('tmm').asstring:=TabControl1.tabs[tabcontrol1.tabindex]+inttostr(clientdataset2.fieldbyname('tid').asinteger);
        clientdataset2.post;
        clientdataset2.applyupdates(-1);
        mslr.Free;
        msda.Free;
    end;
    用文件的,我找到了在给你看,(现在忘的差不多了)^_^
      

  3.   

    to  netlib(河外孤星): 1). 您的程序結構是什麼??是這樣??
    server端;  ADOConnection+ ADOTable+ DataSetProvider
    client端;  SocketConnection+ ClientDataSet2).升级ado组件了嗎  ???  
      

  4.   

    我用的是paradox 数据库
    读文件是这样的,我想这个你应该都知道,
    var
    mslr,msda:tfilestream;
    begin
        panel4.Enabled:=true;
        n15.Enabled:=true;
        mslr:=tfilestream.Create('\temp1.doc',fmopenread);
        msda:=tfilestream.Create('\temp2.doc',fmopenread);
        clientdataset2.Edit;
        clientdataset2lr.LoadFromStream(mslr);
        clientdataset2lrda.LoadFromStream(msda);
        clientdataset2.fieldbyname('tmm').asstring:=TabControl1.tabs[tabcontrol1.tabindex]+inttostr(clientdataset2.fieldbyname('tid').asinteger);
        clientdataset2.post;
        clientdataset2.applyupdates(-1);
        mslr.Free;
        msda.Free;
    end;
    可能是你的数据库连接那个环节不匹配造成的,所以你在检查一下你的数据库设置
      

  5.   

    server端;  BDEQuery+ DataSetProvider
    client端;  SocketConnection+ ClientDataSet
      

  6.   

    客户端没问题,估计是由于服务器自动处理BLOB时出错,可以试一下在服务器端自已写代码来完成此操作,如果依然不成功,那么应该是数据定义的问题了,建议参观一下ORACLE的帮助;
      

  7.   

    回复人: chongyang() (  ) 信誉:100  2002-4-23 15:55:29  得分:0  
     
     
      ORA-01465: invalid hex number 
    Cause: In an UPDATE statement following a SELECT FOR UPDATE, part of the ROWID contains invalid characters. ROWID must be expressed in the proper and expected format for ROWID and within quotes. Action: Enter the ROWID just as it was returned in the SELECT FOR UPDATE.研究一下!---The end;
      
     
      

  8.   

    chongyang()在下面帖子里替我解決過;http://www.csdn.net/expert/topic/666/666458.xml?temp=.7417566
      

  9.   

    可能数据库的blob类型和你的JPG文件存储类型不一致。对啊,象: netlib(河外孤星) 说的,用流来处理!流应该自动转换成任何类型的吧?
      

  10.   

    估计对你有所帮助!!!
    ----------------------------------------------------------------
    Example 1: Inserting a Word document into a BLOB Column using PL/SQL
    The following code (steps 2-5) inserts MyResume.doc in the resume column of sam_emp table.Create a directory object in Oracle. Here is how to create a directory object called MY_FILES which represents C:\MY_DATA directory. You must have CREATE DIRECTORY privilege in Oracle.create or replace directory MY_FILES as 'C:\MY_DATA';Insert a row with empty BLOB in your table and return the locator. 
    Point to the Word file to be loaded from the directory created in Step 1, using the BFILE data type. 
    Open the file and use the locator from step 2 to insert the file. 
    Close the file and commit the transaction. declare
        f_lob   bfile;
        b_lob   blob;begin    insert into sam_emp(empno,ename,resume) 
     values ( 9001, 'Samir',empty_blob() )
     return documents into b_lob;    f_lob := bfilename( 'MY_FILES', 'MyResume.doc' );
        dbms_lob.fileopen(f_lob, dbms_lob.file_readonly);
        dbms_lob.loadfromfile
       ( b_lob, f_lob, dbms_lob.getlength(f_lob) );
        dbms_lob.fileclose(f_lob);    commit;end;
    /