Using BLOBs in Delphi

Hi,
when i want to active a table in delphi that contains
a BLOB field, it through an exception with
message like 'Field Type not supported'
How can I show an image saved in Oracle database with Delphi (version 7)
plz add codes if u can...

This is a Forum for the Oracle Forms product not for Delphi Questions, so it's unlikely you'll find anyone who can help you here.

Similar Messages

  • Can we use BLOB fields (that store images) in Crystal Report ?

    I'm developing with ASP.NET, VS.NET 2003.
    Using Crystal Report for VS.NET
    DataBase: Oracle 10g
    I store a BLOB field in a table. This field store images, like jpg files.
    The Stored Procedure that I use to fill the report is:
    OPEN MyCursor FOR
    SELECT MyId , MyImg
    FROM MyTable
    MyImg is BLOB field
    However, when I try to use the stored procedure in Crystal Report at design mode, any field can be displayed and then drag and drop to the report, but MyImg is not possible.
    There is an error message:
    Details: ADO Error Code: 0x80004005
    Source: Microsoft OLE DB Provider for Oracle
    Description: Data type is not supported
    I'm afraid that is not so easy for me to change DB connector drivers.
    My question is:
    - Is it possible to use BLOB fields in Cyrstal Reports?
    - Or should I convert them previously to something, so they can be displayed in Crystal Report at desing mode ?
    - If I should change DB connector drivers, which one should I use and from where should I download it and then install it in my Web Server?
    Thank you very much!

    Hi,
    I dont know much at all about CR, but I do know Microsoft's OLEDB Provider for Oracle doesnt support Blob datatype.. http://support.microsoft.com/kb/q244661/
    Oracle's OLEDB provider does though, you can get it as part of the ODAC download on OTN.
    Hope that helps,
    Greg

  • Can we use BLOB instead of LONG RAW in JMSStore

    (Oracle 9i, Weblogic 8.1.2)
              We are putting in place a Dataguard environment (or standby database). In such environment, prod data is copied to another database in 'pseudo' real time. Unfortunately some 'old' datatypes are not supported by Dataguard. In JMS tables %JMSSTORE, the field RECORD is defined as LONG RAW and LONG RAW is one of the unsupported datatypes.
              Can we alter those tables in order to use BLOB instead of LONG RAW ?
              Regards,
              Bao Nguyen
              

    Hi Bao,
              Answers in-line:
              Bao Nguyen wrote:
              > (Oracle 9i, Weblogic 8.1.2)
              >
              > We are putting in place a Dataguard environment (or standby database). In such environment, prod data is copied to another database in 'pseudo' real time. Unfortunately some 'old' datatypes are not supported by Dataguard. In JMS tables %JMSSTORE, the field RECORD is defined as LONG RAW and LONG RAW is one of the unsupported datatypes.
              >
              > Can we alter those tables in order to use BLOB instead of LONG RAW ?
              Not supported in 8.1. A supported Oracle BLOB capability will be
              available in the next release. I can think of two
              possible work-arounds:
              (1) The following might work, but is not currently supported by
              BEA: Manually create the table with a BLOB type and use
              an Oracle OCI or BEA type IV driver. Definitely do NOT use
              an Oracle thin driver, as data corruption may result.
              (2) I recall that another customer had a replication product
              they were able to get working with LONG RAW by modifying
              the table definition so that the table's handle index was a primary key.
              I do not remember the name of the product.
              (The latter modification is supported for certain releases
              now - but I think this usage must be confirmed with customer support.)
              Tom
              >
              > Regards,
              >
              > Bao Nguyen
              >
              

  • How to display .doc/.xls file uploaded using blob type of column in table.

    Hi,
    Here
    http://www.oracle.com/technology/obe/apex/apex31nf/apex31blob.htm
    I learnt about uploading & viewing file through BLOB in a form or report . It works fine for pictures & notepad file. But when i upload word file (i.e. *.doc) or excel file ( *.xls ) , and try to view it through DOWNLOAD
    it gives message box
    ' Do you want to save this file, or find program online to open it?'
    I searched lot but enable to find proper & easy to understand solution.
    Hope understand my problem.
    Thanks in advance.

    Hi,
    I am using table emp having fields id,name,,,,,,,,,photo,mimetype,filename,last_update_date.
    photo is of type BLOB. I updated photo (text item) on form.
    I Used BLOB DOWNLOAD Format Mask with appropriate entries & selected display as Attachment.
    So my problem is partially solved. Now if DOWNLOAD link on Form is clicked it displays Excel sheet
    in different window. But still, DOWNLOAD link on my Interactive report not working properly.
    DOWLOAD on interactive if it is clicked it has two problems
    1) It opens image or notepad file in same window.
    2) Not able to open Excel sheet.
    thanks for reply.

  • Upload Images onto oracle using BLOB

    Hi,
    I'm attempting to insert an image on to Oracle10g using BLOB.
    Does anyone hv any idea how to do that with Java?
    Any help will be great.
    Andrea.

    Here you can find a possible solution.

  • Using BLOB for storing OLE Item and Concadinating

    Hi,
    We are using BLOB data type to store Word document using OLE
    interface in forms 6i. It is working fine.
    Now we want to merge two or more BLOB items to one item to make
    the document as a single document. We tried to use
    DBMS_LOB.APPEND package to do the same but we could see only the
    first document that is appended and the remaining documents are
    not visible. When we analyzed the size of the BLOB item, it is
    getting increased whenever we append another document.
    Looking for the solution urgently. It would be better to have
    the code that is used for doing this.
    Thanks in Advance,
    Ganesan

    What you say seems quite normal.
    You should not use dbms_lob.append, but rather call Word and
    copy the text & other objects from one of the LOBs to the end of
    the other one.
    I wish I could tell you more about how to do that, but I don't
    know. I'm still looking for more doco on the methods &
    properties for Word & XL to be invoked when using OLE2.

  • Show photoes using blob field in Oracle DB

    When create Crystal report using Blob field in Oracle 10g DB, the photoes are tif format stored in blod and there are multipages for every record. However in the Crystal Report,it just show the first page of the photo.
    Are there some ways to display all the pages? Or is it necessary to programming using java or .net to display?

    Not capable. CR will only show the first picture and not an album.

  • Using blob or clob from db as document

    I'm changing a working process to fetch an XDP document from a database rather than fetch from resources:// on the Adobe server. The DB2 database field containing the XDP is a clob data type. We were using blob. The services operations are:
    - Foundation/JdbcService/Query Single Row   this fetches the XDP
    - Foundation/SetValue/Execute   this converts whatever was fetched into a document variable
    - Forms/FormsService/renderPDFForm   this merges the document with XML and produces PDF output
    I'm unable to write the database field into a variable due to lack of choices. For instance there is no BLOB or CLOB variable type in the list of available types. When using STRING I get the following error:
    Caused by: java.io.NotSerializableException: com.ibm.db2.jcc.b.ub
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1081)
        at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
        at com.adobe.idp.dsc.util.CoercionUtil.toString(CoercionUtil.java:498)
    When using XML I get the following error:
    Caused by: com.adobe.workflow.WorkflowRuntimeException: Invalid location: /process_data/@clob_XDP_string cannot be stored for action instance: -1
        at com.adobe.workflow.pat.service.PATExecutionContextImpl.setProcessDataValue(PATExecutionCo ntextImpl.java:701)
    When using OBJECT I get the following error:
    Caused by: com.adobe.workflow.WorkflowRuntimeException: Invalid location: /process_data/@clob_XDP_string cannot be stored for action instance: -1
        at com.adobe.workflow.pat.service.PATExecutionContextImpl.setProcessDataValue(PATExecutionCo ntextImpl.java:701)

    Steve,
    Going against DB2 doesn't work for me with a document variable type. It gives a coercion error.
    I did solve my problem though from the following URL: http://groups.google.com/group/livecycle/browse_thread/thread/6c4b9156b52b71a7
    JYates:
    You can do this, but you have to  use the Execute Script service -- at this time there isn't a deployable component for it.
    Use this sort of script in the Execute Script service to read  the PDF blob from the database and populate a Document variable.
    import java.sql.Connection;
    import java.sql.PreparedStatement;
    import java.sql.Statement;
    import java.sql.ResultSet;
    import javax.sql.DataSource;
    import javax.naming.InitialContext; 
    int processId =  patExecContext.getProcessDataIntValue("/process_data/@id"); 
    InitialContext context = new InitialContext();
    Connection connection = ((DataSource)context.lookup("java:/IDP_DS")).getConnection(); 
    String queryQuery = "select bigdocument, bigstring from tb_pt_workwithxlobs where process_instance_id = ?";
    PreparedStatement queryStatement = connection.prepareStatement(queryQuery); 
    try {
       queryStatement.setInt(1, processId);
       ResultSet results = queryStatement.executeQuery();
       results.next();
       java.sql.Blob documentBlob = results.getBlob(1);
       com.adobe.idp.Document document = new com.adobe.idp.Document(documentBlob.getBinaryStream());
       patExecContext.setProcessDataValue("/process_data/@NewBigDocument",document);
       java.sql.Clob stringClob = results.getClob(2);
       patExecContext.setProcessDataValue("/process_data/@NewBigString",stringClob.getSubString( 1L,(int)stringClob.length()));
    catch(Exception ex) {
       ex.printStackTrace();
    queryStatement.close();
    connection.close();

  • Using BLOB or BFILE datatype

    Hi, anyone used BLOB or BFILE before?
    Currently I am thinking of using BLOB or BFILE to store documents (.doc, .pdf, .ppt, .rft, .csv). Can decide yet on which to use. Anyone got any recommendation on which to use?
    1. Any performace issue when using blob after i had stored it in a different tablespace?
    2. Will it take much longer time for export if to use blob.
    3. As for BFILE will it get corrupted if the physical files is delete or been moved to some other location?
    Thanks you in advance, you comments/advice is greatly appreciated..
    Regards,
    lbinsoon

    1. If the blob is in a different tablespace from the row it resides in, that is not a performance impact.
    2. Yes. And how much depends on how much blob data you have. This is because BFILE data is not exported, only the pointers are. So, if you have blob data, it IS exported, making for longer running exports.
    3. Yes. Well, not corrupted, but, of course, you won't be able to access the file. You must update it to point to the new name or location, which can be done with a simple update stmt thus:
    update bf set b = bfilename('d:\tmp','some_binary_file.dat')
    assuming column b is of type BFILE.
    Tom Best

  • Invoking a service using BLOB data syntax

    Hi All,
    When invoking LC using BLOB the syntax is:
    //Create a BLOB object
    BLOB inDoc = new BLOB();
    //Populate the BLOB objects remoteURL data member
    inDoc.remoteURL = urlData;
    //Invoke the EncryptDocument process
    BLOB outDoc = encryptClient.invoke(inDoc);
    How the syntax goes when my service has also an input string variable,
    and how to handle the result if it also returns output string
    variable?
    Thanks in advance!

    Hi Jasmin,<br /><br />I've copied this code from "Invocation API quick starts" document,<br />see the full code:<br /><br />import com.adobe.idp.services.*;<br />import java.io.File;<br />import java.io.FileOutputStream;<br />import java.io.InputStream;<br />import java.net.URL;<br />import javax.activation.DataHandler;<br />import javax.activation.FileDataSource;<br />import org.apache.axis.attachments.AttachmentPart;<br />public class InvokeDocumentEncryptDime {<br />public static void main(String[] args) {<br />try{<br />//create a service locator<br />EncryptDocumentServiceLocator locate = new<br />EncryptDocumentServiceLocator();<br />  //specify the service target URL and object type<br />URL serviceURL = new<br />URL("http://localhost:8080/soap/services/EncryptDocument?blob=dime");<br />//Use the binding stub with the locator<br />EncryptDocumentSoapBindingStub encryptionClientStub = new<br />EncryptDocumentSoapBindingStub(serviceURL,locate);<br />encryptionClientStub.setUsername("administrator");<br />encryptionClientStub.setPassword("password");<br />//Get the DIME Attachments - which is the PDF document to encrypt<br />java.io.File file = new java.io.File("C:\\Adobe\\Loan.pdf");<br />//Create a DataHandler object<br />DataHandler buildFile = new DataHandler(new FileDataSource(file));<br />//Use the DataHandler object to create an AttachmentPart object<br />AttachmentPart part = new AttachmentPart(buildFile);<br />//get the attachment ID<br />String attachmentID = part.getContentId();<br />//Add the attachment to the encryption service stub<br />encryptionClientStub.addAttachment(part);<br />//Inform ES where the attachment is stored by providing the attachment id<br />BLOB inDoc = new BLOB();<br />inDoc.setAttachmentID(attachmentID);<br />BLOB outDoc = encryptionClientStub.invoke(inDoc);<br />//Go through the returned attachments and get the encrypted PDF document<br />byte[] resultByte = null;<br />attachmentID = outDoc.getAttachmentID();<br />//Find the proper attachment<br />Object[] parts = encryptionClientStub.getAttachments();<br />for (int i=0;i<parts.length;i++){<br />AttachmentPart attPart = (AttachmentPart) parts[i];<br />if (attPart.getContentId().equals(attachmentID)) {<br />//DataHandler<br />buildFile = attPart.getDataHandler();<br />InputStream stream = buildFile.getInputStream();<br />byte[] pdfStream = new byte[stream.available()];<br />stream.read(pdfStream);<br />//Create a File object<br />File outFile = new File("C:\\Adobe\\EncryptLoan.pdf");<br />//Create a FileOutputStream object.<br />FileOutputStream myFileW = new FileOutputStream(outFile);<br />//Call the FileOutputStream objects write method and pass the pdf<br />data<br />myFileW.write(pdfStream);<br />//Close the FileOutputStream object<br />myFileW.close();}}}<br /><br />The process I wish to invoke has 2 input parameters:<br />string variable  and a document,also this process returns a string and document as output.<br /><br />Do you have any example how to invoke it and handle its result?<br /><br />Thanks!

  • Using Blobs - possible performance issues

    Hello,
    We are considering using BLOBs in our Oracle 9i database( supposed to be migrated to 10g soon)
    Here is the scenario
    ·     20 000 BLOB/year keeping during 5 years
    ·     100 inserts per day
    ·     200 reads per day
    ·     Maximum BLOB size is 150 Kb
    What will be performance impact of using Blobs on INSERT/SELECT ?
    Would it be better to separate BLOBs on the different tablespace ?
    Thanks in advance
    Alexander

    Hello,
    We are considering using BLOBs in our Oracle 9i
    database( supposed to be migrated to 10g soon)
    Here is the scenario
    ·     20 000 BLOB/year keeping during 5 years
    ·     100 inserts per day
    ·     200 reads per day
    ·     Maximum BLOB size is 150 Kb
    What will be performance impact of using Blobs on
    INSERT/SELECT ?Are these stored in the tables or outside the tables using locators?
    Would it be better to separate BLOBs on the different
    tablespace ?
    Yes. It is better to store on different Tablespace.

  • Using BLOB,BFILE

    hello Gurus,
    I want to know these two things
    ٭ How to use BLOB data type?
    ٭ How to use BFILE data type?
    Regards
    Santosh Kumar

    Apart from what Raford mentioned, you should also keep in mind about the security aspect of it.
    Documents stored in db are more secured or can be made more secured.
    When you use bfiles, they are stored in OS and thus can be deleted intentionally or by mistake.
    Performance wise, they donot make much difference even though bfile have an overhead of going to file system to fetch the fiiles/information.

  • Using BLOB's

    I am attempting to use SQL Plus to create a database that contains images using BLOBs. Here is the table:
    Create table TEST
    (REFERENCE Number(1),
    TEST_IMAGE Blob);
    I have used the empty_blob() function:
    Insert INTO TEST
    VALUES(1, empty_blob());
    But I am now unsure how to get the locator of the blob into the table. Is this just a simple insert or is there a procedure that is needed? Any help would be greatly appreciated.
    null

    declare
    VBLOB_TESTIMAGE BLOB;
    BEGIN
    SELECT TEST_IMAGE INTO VBLOB_TESTIMAGE
    WHERE REFERENCE = 1;
    --now VBLOB_TESTIMAGE consist of BLOB locator
    END;
    TRY THIS AND LET ME KNOW IF U FIND ANY DIFFICULTY.
    [email protected]

  • Example of PL/SQL PROGRAM USING  BLOB datatype

    give me one example of PL/SQL PROGRAM BY USING BLOB DATATYPE

    Try this link
    http://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96591/toc.htm
    Best Regards
    Krystian Zieja / mob

  • Help:- Store Word file in database using blob

    Hai all,
    i want to store word document in database and reterieve from database but i don't have any idea i heared about blob but i don't know how to make it any one have source code or example form pls send me
    email: [email protected]

    Hello,
    First of all, you have got to be granted the privilege to read and write to the file system, this is a must to use BFile read access.
    A global function bfilename returns a bfile taking the file path as an argument is needed to construct a blob object through dbms_lob.loadfromfile.
    A very helpful example I found on orafaq follows:Create a link to the directory where the file to load in the blob is
    (connect as system then grant read privilege to your user):
    create or replace directory blob_dir as 'C:\Documents';
    Custom the following procedure that I copied from a Thread
    create or replace procedure blob_ins(p_id in number, p_filename in
    varchar2) as
    l_bfile bfile;
    l_blob blob;
    begin
    insert into blob_test(p_id, empty_blob())
    returning blob_file into l_blob;
    l_bfile := bfilename('BLOB_DIR', p_filename);
    dbms_lob.fileopen(l_bfile);
    dbms_lob.loadfromfile(l_blob, l_bfile, dbms_lob.getlength(l_bfile));
    dbms_lob.fileclose(l_bfile);
    commit;
    return;
    end blob_ins;
    You can use UTL_FILE package in another way, but this is much more safe;
    Have Fun
    Hossam Al Din

Maybe you are looking for

  • Weird PPPoE problem with new Time Capsule

    OK, so this is a long and tedious saga, but I don't know what details are important and what are irrelevant. I had an old AirPort Extreme which was giving me problems. I could connect to the internet fine when I connected my MacBook directly to the D

  • Is Adobe AIR needed if no cloud is used?

    Do I need Adobe AIR? I have the whole Adobe Design and Web Premium CS6 suite but I don't use any cloud services nor plan to. If Acrobat and Photoshop ever go only the way of Adobe Cloud (which seems to be) then for the 1st time in my history with Ado

  • Flash CC 2014 (1308) crashes immediately after launch (creative cloud)

    Flash CC 2014 (1308) crashes immediately after launch (creative cloud) Singning out and in again does not solve the problem. Thanks for any help. Slyrs66 Short version of the crash report: Process:     Adobe Flash CC 2014 [1308] Path:        /Applica

  • Don't Have Permissions to View TM Backups?

    Not long ago, I began to use Time Machine with an external hard drive. It's work very well ... until now. I have 4 internal hard drives, all of which are backing up to TM (on the external hard drive). Today, I neede to restore a file from one of the

  • Droping tables according to some conditions

    I am new to Database side. i want to drop tables which are like 'C$%'. How should i achieve that ? What would be query ?