Writing BLOB column from Cobol

Hi,
I´m using the Pro*Cobol pre-compile to execute SQL statements into programs Cobol Net Express.
I need two helps.
1 - How can do to the Pro*Cobol cut the blanks on the right into PIC X Varying hosts variables ?
For example :
..... LastName VARCHAR(20)
..... 05 LASTNAME PIC X(20) VARYING.
The Pro*Cobol documentation say that precompile transform the elementary item LASTNAME to the group item bellow :
05 LASTNAME.
10 LASTNAME-LEN PIC S9(04) COMP.
10 LASTNAME-ARR PIC X(20).
When a string less than 20 is moved to LASTNAME-ARR, the exact string lenght is moved to the LASTNAME-LEN and the string is writen
into DB without blanks on right.
When a string is red from DB, the precompile write into LASTNAME-LEN the exact string lenght and the LASTNAME-ARR receive the
string value without blanks on write.
Occurs that when I compile the program the Pro*Cobol/Micro Focus don´t recognize LASTNAME-LEN and LASTNAME-ARR.
Am I correct ? May I use any directive that resolve that ?
2 - I need to check these step-by-step to write a text file generated from cobol into a BLOB column.
The LOAD FROM FILE statement receive SQLCODE -22275 : Invalid LOB locator specified.
Assumptions :
MAG-RELAT-BFILE SQL-BFILE.
MAG-RELAT-BLOB SQL-BLOB.
The fiel R1401 exists in D:\Petros\NE\
Source Code :
MOVE 'D:\Petros\NE\' TO ALIAS
MOVE 13 TO ALIAS-L
MOVE 5 TO FILENAME-L
MOVE 'R1401' TO FILENAME
EXEC SQL
ALLOCATE :IMAG-RELAT-BFILE
END-EXEC.
IF SQLCODE NOT EQUAL +0
MOVE 'ERRO COMANDO ALLOCATE' TO WW-CA-MENSAGEM
MOVE 'IMAG-RELAT-BFILE' TO WW-CA-ARQUIVO
MOVE SQLCODE TO WW-ST-ARQUIVO
MOVE 08 TO RETURNO-CODE
PERFORM 999-TRATA-ERRO THRU 999-FIM
END-IF.
EXEC SQL
LOB FILE SET :IMAG-RELAT-BFILE
DIRECTORY = :ALIAS,
FILENAME = :FILENAME
END-EXEC.
IF SQLCODE NOT EQUAL +0
MOVE 'ERRO COMANDO LOB FILE SET' TO WW-CA-MENSAGEM
MOVE 'IMAG-RELAT-BFILE' TO WW-CA-ARQUIVO
MOVE SQLCODE TO WW-ST-ARQUIVO
MOVE 08 TO RETURNO-CODE
PERFORM 999-TRATA-ERRO THRU 999-FIM
END-IF.
EXEC SQL
ALLOCATE :IMAG-RELAT-BLOB
END-EXEC
IF SQLCODE NOT EQUAL +0
MOVE 'ERRO COMANDO ALLOCATE' TO WW-CA-MENSAGEM
MOVE 'IMAG-RELAT-BLOB' TO WW-CA-ARQUIVO
MOVE SQLCODE TO WW-ST-ARQUIVO
MOVE 08 TO RETURNO-CODE
PERFORM 999-TRATA-ERRO THRU 999-FIM
END-IF.
EXEC SQL
LOB LOAD :TOTAL-BYTES
FROM FILE :IMAG-RELAT-BFILE
INTO :IMAG-RELAT-BLOB
END-EXEC.
IF SQLCODE NOT EQUAL +0
MOVE 'ERRO COMANDO LOAD FFOM FILE' TO WW-CA-MENSAGEM
MOVE 'IMAG-RELAT-BFILE, IMAG-RELAT-BLOB' TO WW-CA-ARQUIVO
MOVE SQLCODE TO WW-ST-ARQUIVO
MOVE 08 TO RETURNO-CODE
PERFORM 999-TRATA-ERRO THRU 999-FIM
END-IF.
Thanks,

907466 wrote:
Hi,
I´m using the Pro*Cobol pre-compile to execute SQL statements into programs Cobol Net Express.
I started my career as a cobol programmer in 1981, and the last project I worked on before transitioning to DBA was implementing MF Cobol. It's been a number of years but ...
I need two helps.
1 - How can do to the Pro*Cobol cut the blanks on the right into PIC X Varying hosts variables ?
For example :
..... LastName VARCHAR(20)
..... 05 LASTNAME PIC X(20) VARYING.
The Pro*Cobol documentation say that precompile transform the elementary item LASTNAME to the group item bellow :
05 LASTNAME.
10 LASTNAME-LEN PIC S9(04) COMP.
10 LASTNAME-ARR PIC X(20).
When a string less than 20 is moved to LASTNAME-ARR, the exact string lenght is moved to the LASTNAME-LEN and the string is writen
into DB without blanks on right.
When a string is red from DB, the precompile write into LASTNAME-LEN the exact string lenght and the LASTNAME-ARR receive the
string value without blanks on write.
Occurs that when I compile the program the Pro*Cobol/Micro Focus don´t recognize LASTNAME-LEN and LASTNAME-ARR.
Am I correct ? May I use any directive that resolve that ?
I don't know if you are correct or not. Is the pre-compiler or compiler step throwing an error message? If you are correct, there should be an error message that you should share with us.
2 - I need to check these step-by-step to write a text file generated from cobol into a BLOB column.
The LOAD FROM FILE statement receive SQLCODE -22275 : Invalid LOB locator specified.
Assumptions :
MAG-RELAT-BFILE SQL-BFILE.
MAG-RELAT-BLOB SQL-BLOB.
The fiel R1401 exists in D:\Petros\NE\
Source Code :
MOVE 'D:\Petros\NE\' TO ALIAS
MOVE 13 TO ALIAS-L
MOVE 5 TO FILENAME-L
MOVE 'R1401' TO FILENAME
EXEC SQL
ALLOCATE :IMAG-RELAT-BFILE
END-EXEC.
IF SQLCODE NOT EQUAL +0
MOVE 'ERRO COMANDO ALLOCATE' TO WW-CA-MENSAGEM
MOVE 'IMAG-RELAT-BFILE' TO WW-CA-ARQUIVO
MOVE SQLCODE TO WW-ST-ARQUIVO
MOVE 08 TO RETURNO-CODE
PERFORM 999-TRATA-ERRO THRU 999-FIM
END-IF.
EXEC SQL
LOB FILE SET :IMAG-RELAT-BFILE
DIRECTORY = :ALIAS,
FILENAME = :FILENAME
END-EXEC.
IF SQLCODE NOT EQUAL +0
MOVE 'ERRO COMANDO LOB FILE SET' TO WW-CA-MENSAGEM
MOVE 'IMAG-RELAT-BFILE' TO WW-CA-ARQUIVO
MOVE SQLCODE TO WW-ST-ARQUIVO
MOVE 08 TO RETURNO-CODE
PERFORM 999-TRATA-ERRO THRU 999-FIM
END-IF.
EXEC SQL
ALLOCATE :IMAG-RELAT-BLOB
END-EXEC
IF SQLCODE NOT EQUAL +0
MOVE 'ERRO COMANDO ALLOCATE' TO WW-CA-MENSAGEM
MOVE 'IMAG-RELAT-BLOB' TO WW-CA-ARQUIVO
MOVE SQLCODE TO WW-ST-ARQUIVO
MOVE 08 TO RETURNO-CODE
PERFORM 999-TRATA-ERRO THRU 999-FIM
END-IF.
EXEC SQL
LOB LOAD :TOTAL-BYTES
FROM FILE :IMAG-RELAT-BFILE
INTO :IMAG-RELAT-BLOB
END-EXEC.
IF SQLCODE NOT EQUAL +0
MOVE 'ERRO COMANDO LOAD FFOM FILE' TO WW-CA-MENSAGEM
MOVE 'IMAG-RELAT-BFILE, IMAG-RELAT-BLOB' TO WW-CA-ARQUIVO
MOVE SQLCODE TO WW-ST-ARQUIVO
MOVE 08 TO RETURNO-CODE
PERFORM 999-TRATA-ERRO THRU 999-FIM
END-IF.
Thanks,So far you haven't shown us any symptoms, errors, etc. Just a description of what you are doing and a statement that you assume it won't work. Your executable code has a lot of reference to host variables that we can only assume a spelled correctly to match to variables you've declared in your data division. Are you going straight from submitting precompile to run-time, or are you using the very excellent interactive source-level debugger that is a prime feature of MF Cobol?

Similar Messages

  • I can't import a table contains BLOB column  from one user to another user.

    1) I create two user both have connect role,and each has its own tablespace, DDL:
    create user d2zd identified by d2zd default tablespace d2zd quota unlimited on d2zd account unlock;
    grant connect to d2zd;
    create user d3zd identified by d3zd default tablespace d3zd quota unlimited on d3zd account unlock;
    grant connect to d3zd;
    2)Then enter oracle as d2zd and create a table contains BLOB column and insert data to the table.
    3) export d2zd as follow:
    exp d2zd/d2zd file=d2zd.dmp
    4) import to d3zd as follow:
    imp d3zd/d3zd fromuser=d2zd touser=d3zd file=d2zd.dmp
    the question is the table with BOLB colum can't be import,
    it says:have no privilege on tablespace d2zd.
    How can I import a table contains BLOB column from one user to another user?

    Hi - the reason for as our friend already told ist that a blob can be stored outside of the table segment, in another Tablespace, This is for performance reason.
    Sou you would need to have Quota on two tablespaces.
    the one which holds the table segment the other which holds the blob(segment).
    Regards
    Carl
    Message was edited by:
    kreitsch

  • To see the content of a BLOB column from sqlplus

    Hi,
    I have a table which has a BLOB column.
    The blobs are text files.
    Is there a way to check the content of blob column from sqlplus itself.
    Thanks.

    There's no information about versin of database
    If you're using 11g, then refer to this link:
    http://dbathoughts.blogspot.com/2008/05/blob-support-in-sqlplus.html
    If you're using 10g, then refer to this link
    http://www.experts-exchange.com/Database/Oracle/Q_20419597.html
    Kamran Agayev A. (10g OCP)
    http://kamranagayev.wordpress.com

  • How to upload a file into a db blob column from adf page

    How to upload a file into a db blob column from adf page
    Which option to use ?

    The forum search would be my first try...
    Then google...
    This has been asked at least once a week and got correct answers...
    Timo

  • Stuck threads reading blob column from db table

    WLS 10.3.5, JDK 1.6u29, Oracle 11g RAC, ojdbc6 latest driver
    We're having problems with stuck threads trying to read a blob column from a DB table. The query to extract the blob is a simple select, without any locking such as "for update" clauses or whatever. The blob's size is <= 100k.
    The thread dump shows the following stack trace:
    +"[STUCK] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'" RUNNABLE native+
    +     java.net.SocketInputStream.socketRead0(Native Method)+
    +     java.net.SocketInputStream.read(SocketInputStream.java:129)+
    +     oracle.net.ns.Packet.receive(Packet.java:300)+
    +     oracle.net.ns.DataPacket.receive(DataPacket.java:106)+
    +     oracle.net.ns.NetInputStream.getNextPacket(NetInputStream.java:315)+
    +     oracle.net.ns.NetInputStream.read(NetInputStream.java:260)+
    +     oracle.jdbc.driver.T4CSocketInputStreamWrapper.read(T4CSocketInputStreamWrapper.java:105)+
    +     oracle.jdbc.driver.T4CMAREngine.getNBytes(T4CMAREngine.java:1517)+
    +     oracle.jdbc.driver.T4C8TTILobd.unmarshalLobData(T4C8TTILobd.java:476)+
    +     oracle.jdbc.driver.T4C8TTILob.readLOBD(T4C8TTILob.java:770)+
    +     oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:361)+
    +     oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:192)+
    +     oracle.jdbc.driver.T4C8TTILob.read(T4C8TTILob.java:146)+
    +     oracle.jdbc.driver.T4CConnection.getBytes(T4CConnection.java:2392)+
    +     oracle.sql.BLOB.getBytes(BLOB.java:348)+
    +     oracle.sql.BLOB.getBytes(BLOB.java:222)+
    +     weblogic.jdbc.wrapper.Blob_oracle_sql_BLOB.getBytes(Unknown Source)+
    +     com.ibatis.sqlmap.engine.type.BlobTypeHandlerCallback.getResult(BlobTypeHandlerCallback.java:33)+
    +     com.ibatis.sqlmap.engine.type.CustomTypeHandler.getResult(CustomTypeHandler.java:52)+
    +     com.ibatis.sqlmap.engine.mapping.result.ResultMap.getPrimitiveResultMappingValue(ResultMap.java:619)+
    +     com.ibatis.sqlmap.engine.mapping.result.ResultMap.getResults(ResultMap.java:345)+
    +     com.ibatis.sqlmap.engine.execution.SqlExecutor.handleResults(SqlExecutor.java:384)+
    +     com.ibatis.sqlmap.engine.execution.SqlExecutor.handleMultipleResults(SqlExecutor.java:300)+
    +     com.ibatis.sqlmap.engine.execution.SqlExecutor.executeQuery(SqlExecutor.java:189)+
    +     com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.sqlExecuteQuery(MappedStatement.java:221)+
    +     com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryWithCallback(MappedStatement.java:189)+
    +     com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryForList(MappedStatement.java:139)+
    +     com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:567)+
    +     com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:541)+
    +     com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForList(SqlMapSessionImpl.java:118)+
    +     com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForList(SqlMapClientImpl.java:94)+
    +     com.ibatis.dao.client.template.SqlMapDaoTemplate.queryForList(SqlMapDaoTemplate.java:282)"[STUCK] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'" RUNNABLE native+
    +     java.net.SocketInputStream.socketRead0(Native Method)+
    +     java.net.SocketInputStream.read(SocketInputStream.java:129)+
    +     oracle.net.ns.Packet.receive(Packet.java:300)+
    +     oracle.net.ns.DataPacket.receive(DataPacket.java:106)+
    +     oracle.net.ns.NetInputStream.getNextPacket(NetInputStream.java:315)+
    +     oracle.net.ns.NetInputStream.read(NetInputStream.java:260)+
    +     oracle.jdbc.driver.T4CSocketInputStreamWrapper.read(T4CSocketInputStreamWrapper.java:105)+
    +     oracle.jdbc.driver.T4CMAREngine.getNBytes(T4CMAREngine.java:1517)+
    +     oracle.jdbc.driver.T4C8TTILobd.unmarshalLobData(T4C8TTILobd.java:476)+
    +     oracle.jdbc.driver.T4C8TTILob.readLOBD(T4C8TTILob.java:770)+
    +     oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:361)+
    +     oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:192)+
    +     oracle.jdbc.driver.T4C8TTILob.read(T4C8TTILob.java:146)+
    +     oracle.jdbc.driver.T4CConnection.getBytes(T4CConnection.java:2392)+
    +     oracle.sql.BLOB.getBytes(BLOB.java:348)+
    +     oracle.sql.BLOB.getBytes(BLOB.java:222)+
    +     weblogic.jdbc.wrapper.Blob_oracle_sql_BLOB.getBytes(Unknown Source)+
    +     com.ibatis.sqlmap.engine.type.BlobTypeHandlerCallback.getResult(BlobTypeHandlerCallback.java:33)+
    +     com.ibatis.sqlmap.engine.type.CustomTypeHandler.getResult(CustomTypeHandler.java:52)+
    +     com.ibatis.sqlmap.engine.mapping.result.ResultMap.getPrimitiveResultMappingValue(ResultMap.java:619)+
    +     com.ibatis.sqlmap.engine.mapping.result.ResultMap.getResults(ResultMap.java:345)+
    +     com.ibatis.sqlmap.engine.execution.SqlExecutor.handleResults(SqlExecutor.java:384)+
    +     com.ibatis.sqlmap.engine.execution.SqlExecutor.handleMultipleResults(SqlExecutor.java:300)+
    +     com.ibatis.sqlmap.engine.execution.SqlExecutor.executeQuery(SqlExecutor.java:189)+
    +     com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.sqlExecuteQuery(MappedStatement.java:221)+
         com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryWithCallback(MappedStatement.java:189)
    +     com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryForList(MappedStatement.java:139)+
    +     com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:567)+
    +     com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:541)+
    +     com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForList(SqlMapSessionImpl.java:118)+
    +     com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForList(SqlMapClientImpl.java:94)+
    +     com.ibatis.dao.client.template.SqlMapDaoTemplate.queryForList(SqlMapDaoTemplate.java:282)+
    Some threads eventually end (after 1-2 hours), most of them remain there for days.
    Any hint would be quite useful, thanks.

    Threads are executing the actual allocated request from the Weblogic Kernel. Most of the problems happen when the Thread execution is reaching the application or business layer.
    At this point your application Java code module is sending or receiving data from external sources such as a an Oracle database for example. Any problem with such external system will cause the Thread to hang and wait for data to come back.
    Other situations can occur such as internal deadlock, infinite looping, heavy IO contention on your server etc.
    Doesn't loo like a driver issue.
    http://docs.oracle.com/cd/E21764_01/doc.1111/e14770/weblogic_server_issues.htm#autoId2
    Check at the Database end
    Cheers ...

  • Writing BLOB column into a csv or txt or sql  files

    Hi All,
    I am having a requirement where i have to upload a file from user desktop and place that file into a unix directory. For this i am picking that file into a table using APEX and then writing that file in unix directory using UTL_FILE.
    The problem which i am facing is that after this every line in my file is having ^M character at the end.
    For this i modified my BLOB column into a CLOB column and then also i am facing the same problem.
    Is there any way to get rid of this as i have to upload these csv or txt files into tables using sql loader programs. i can;t write any shell script to remove ^M character before uploading as this program will be merge with existing programs and then it will require lots of code change.
    Kindly Help.
    Thanks
    Aryan

    Hi Helios,
    Thanks again buddy for your reply and providing me different ways.... but still the situation is i can;t write any shell script for removing the ^M. I will be writing into a file from CLOB column.
    Actually the scenrio is when i am writing a simple VARCHAR columns with 'W' mode then it is working fine, but i have a BLOB column which stores the data in binary format so i am converting that column into CLOB and then writing it into file with 'W' mode but then i am getting ^M characters. As per your suggestion i have to then again run a program for removing ^M or i have to modify all my previous programs for removing ^M logic.
    I want to avoid all these, and just wanted a way so that while writing into a file itself it should not have ^M. Else i have to go for a java stored procedure for running a shell script from sql, and in this still i am having some problem.
    Thanks Again Helios for your time and help.
    Regards
    Aryan

  • Migrating a table with BLOB column from one db to another

    Hello everybody,
    I have two databases D1 and D2. Each database contains table T1 (same structure in both databases). T has a BLOB column and is populated in D1. I have to move all the data from T database D1 into T database D2.
    D1 and D2 are located on different machines. T in D1 is a huge table (milions of records). What is the best solution to migrate the T data between the 2 databases?
    Any help will be appreciated.
    Thank you in advance.
    daniela

    Depending on the version of the database you have, you could use transportable tablespaces.
    http://download-east.oracle.com/docs/cd/B10501_01/server.920/a96524/c04space.htm#9370

  • Insert into blob column from form6i

    Dear all,
    I have a question....
    I need to develop an application with form6i which gets the filename and path from user and inserts the content of the file in a table with blob column...
    the files may be in any format...How can I do it in oracle form 6i..our database is 10g...
    If anybody has a sample please send me :[email protected]
    ThanX
    Farnaz

    If you want to insert a string and next convert to BLOB, you use the next SQL
    PreparedStatement ps = connectionObject.prepareStatement("INSERT INTO TEST_BLOB(NO,STR) VALUES(?,TO_BLOB(?))");and next
    ps.setInt(1, "1");
    ps.setString(2,"sample string here");

  • How to read BLOB column from a table in SQL or PL/SQL

    I have table which is having one BLOB data type column . Ihave inserted few rows in that table . Now i want to see wheather BLOB column has been inserted properly or not . How to read that column through SQL or PL/SQL.
    Can anyone help me to do this.

    You can only manipulate LOBs in PL/SQL because you have to use the DBMS_LOB package.
    Check out the Oracle Developer's Guide

  • Writing BLOB column into a file (NT/WinWord)

    I need to create
    a file on NT and extract the contents of a BLOB
    column and put it in the file. It's a WORD-document
    and I'm using 8.1.7 on NT4SP5. I'm thinking some
    combination of the LOB package and UTL_FILE, but
    some far no luck. Example code would help me.
    Thanks in advance
    Dannys

    dbms_lob, utl_lob is not supported by oracle, written by an in-
    house analyst to demonstrate a concept.

  • How to open a BLOB column stored in oracle using OLE wrappers

    Hello friends
    I have a strange problem, I have OLE objects like, *.doc, *.xls, *.bmp etc all these files have been embedded in oracle database using OLE2.0 & wrapping technology. Well I have to extract this data outof BLOB column from Oracle database & store it in OS file in its respective format
    For Eg. If the BloB data which has been embedded in Oracle database using OLE2.0 & wrapping is of *.doc file then the OS file which I have stored after extraction I should be able to open in MS word.
    Well in this task I am able to extract the file using GETCHUNK feature from VB , but I am not able to open the OS file in MS word as it is saying the error
    the document you are trying to open is not supported by MS Word
    So please any one of you can help me to solve this problem I wil be very helpful. also if you have suported code for ths problem It is welcome
    Not only using VB if you have code of any other langauges also itis welcomed
    Thanks
    Adhem

    Please "Preview" your future posts. Your formatting is awful. Especially learn to use the [ code ] tags.
    Are you sure DateTime.Now.ToString() returns a string in the format of 'MM/DD/YYYY HH:MI:SS.FF3'?
    Fix that and if you still having the problems, debug the actual result of your string.Format() and post that.

  • How to Copy (or) Transfer data in a BLOB Table From one database to another

    Dear Members,
    I want to Copy or Tranfer the data in a Table having BLOB Column from one database to another database.
    The Problem is that I am using COPY Command.
    COPY from scott/[email protected] to k5esk_ldb2/k5esk_ldb2@k5_ist.world CREATE BLOB_TABLE using select * from BLOB_TABLE;
    This is working only if the table is not having BLOB Column or CLOB columns.
    Is there any other way to do the same.
    Appreciate any Help.
    Regards
    Madhu K

    You could try using export/import utilities, but may run into tablespace issues if the tablespaces are not the same between the two databases. You can also try Data Pump using the REMAP_TABLESPACE variable if you tablespaces are different. You could also write your own export and import code...there are plenty of examples of that to copy.

  • Insert Image to BLOB column

    Hi,
    How can i insert a image/largefile into table (having BLOB column) from sql plus?
    Thanks

    Hi!
    Do this with PL/SQL.
    CREATE TABLE image_tbl
      filename VARCHAR2(4000),
      image   BLOB
    DECLARE
          v_blob       BLOB;
          v_srcfile    BFILE;
    BEGIN
          DBMS_LOB.CreateTemporary(v_blob, TRUE);
          DBMS_LOB.Open(v_blob, dbms_lob.Lob_ReadWrite);
          v_srcfile := Bfilename('IMAGE_DIR', 'image.gif');
          DBMS_LOB.FileOpen (v_srcfile, dbms_lob.File_ReadOnly);
          DBMS_LOB.LoadFromFile(v_blob, v_srcfile, DBMS_LOB.GetLength(v_srcfile));
          INSERT INTO image_tbl (filename, image)
          VALUES ('image.gif', EMPTY_BLOB());
          UPDATE image_tbl
          SET image = v_blob
          WHERE filename LIKE 'image.gif';
          DBMS_LOB.FileClose(v_srcfile);
          COMMIT;
    END;I hope that one will help you.
    yours sincerely
    Florian W.

  • Using ESB + DBAdapter with a BLOB column

    Hi
    Are there any tips and tricks for using the database adapter with a BLOB column from a table?
    I'd like to get a hex coded string out, if I put 012346789ABCDEF into the blob colum I get ASNFZ4mrze8= as the output in the file adapter.
    Any tips welcome
    Angus

    Legatti,
    I have feedback=10000. However by monitoring the import, I know that its loading average of 130 records per minute. Which is very slow considering that the table contains close to two millions records.
    Thanks for your reply.

  • Blob Column in Data Template

    Below is simple Example I tried and output doesnot look right.
    Note: My Blob Database Column is "LOGO".
    Sample Data Template:
    <?xml version="1.0" encoding="WINDOWS-1252"?>
    <dataTemplate name="Employee_Listing" description="List of
    Employees">
    <dataQuery>
    <sqlStatement name="Q1">
    <![CDATA[SELECT EMPNO,ENAME,JOB,LOGO from
    EMP]]>
    </sqlStatement>
    </dataQuery>
    <dataStructure>
    <group name="G_EMP" source="Q1">
    <element name="EMPLOYEE_NUMBER" value="EMPNO" />
    <element name="NAME" value="ENAME"/>
    <element name="JOB" value="JOB" />
    <element name="LOGO" value="LOGO" />
    </group>
    </dataStructure>
    </dataTemplate>
    Sample Ouput Created
    <?xml version="1.0" encoding="UTF-8"?>
    <EMPLOYEE_LISTING>
    <LIST_G_EMP>
    <G_EMP>
    <EMPLOYEE_NUMBER>999</EMPLOYEE_NUMBER>
    <NAME>PILLAI</NAME>
    <JOB>MGR</JOB>
    <LOGO/>
    </G_EMP>
    </LIST_G_EMP>
    </EMPLOYEE_LISTING>
    My Question is :
    Does output should have only a TAG for Blob Column or it should have image data
    which can be rendered through Template using fo:instream tags.
    Am I hitting any bug which is preventing retrieving Blob data through XML data template

    I need to get data out of a BLOB column from a table in an Oracle 8i database and into a file that I can put into a MS Word template. The data in the BLOB column came from a MS Word document. What is the best way to proceed? We have a LOB datatype sample which shows how to save a blob from the DB to a local file at http://otn.oracle.com/sample_code/tech/java/sqlj_jdbc/files/advanced/advanced.htm
    I'd save it to a temp file and then using word add it. You could also spawn wscript.exe to run a Windows VB Script to automate word from the java application.
    Rob

Maybe you are looking for

  • Redirect to another website when I share my Network

    Hi, When I am with my friends, I often share my network for they can connect to my 4G. But I have not an unlimited data. So, when they go on Youtube for exemple, I wish they are redirected to an another website. I have thinked to modify the hosts fil

  • Folio do not open in iPad viewer ios8

    i installed ios8 in in an ipad 2 and and get the actualization of the adobe viewer and all the content thaw was loaded did not open. i eliminate all of them and return to indesing cc to download it again. the content work normal when the iPad is conn

  • Reentan

    hello i've got a problem with my vi. pictures from the vi's are in the attachement (pic.zip). the problem is, that i have parallel loops(pic1.jpg) where this vi (pic.jpg) is used. these loops give me a message if one of the elements in the cluster is

  • Can't get album artwork into itouch

    have lots of album artwork in my library; can't seem to get it onto my itouch help? thanks [email protected]

  • Missing edit & view menus in fcp7

    Here recently I notice my edit & view menu is missing.  I restart FCP7 and it comes back then it goes away again.  When they go away, mark -help moves down to the file menu.  Doing a Google search comes up with is to reload FCP7 to correct the issue.