BLOB problem in forms 6i

Hi All,
i have a problem with BLOB data type. i just create a base table block thru wizard. i have one BLOB field in my table. i use GET_FILE_NAME and READ_IMAGE_FILE to store image in base table block field and press commit. it shows 1 transaction completed. when i query record it cannot shows any record. i checked it from SQL/PLUS, it shows no record in table (select count(*) from mytable) . when i use LONG RAW type its work. i'm using ORACLE 9i database and forms 6i rel 2.
plz tell me what i can do in this regard.
Thanks in advance
Shakeel

Hello there,
i have created a table(with 3 columns) one blob column, i commit one record as you have said and i saved it.
(i) The sql don't display
(ii) On forms it is showing
(iii) i have set item property (image), if you set any other accept except image or oracle defined then it will not display.
with best regards,
[email protected]

Similar Messages

  • Problem viewing forms.This form is not supported with the current version of Adobe Reader.Upgrade to the latest version for full support. That does that mean exactly?

    Problem viewing forms.This form is not supported with the current version of Adobe Reader.
    Upgrade to the latest version for full support.
    What exactly do I need to do?

    That means you were probably using Adobe Acrobat to view PDF's. Acrobat is totally unnessary, you can view PDF's in Preview (Applications - Preview).
    BTW PLEASE complete your profile. It's very difficult to help  someone when they don't provide any information about their system. You can easily do this by clicking Your Stuff in the upper right of this page, then click Profile and fill in the pertinent information.

  • Role Based Access problem in forms

    This would be a long reading.
    I'm having a problem with forms Role Based Access.
    We have two databases, one in London and one in Zurich. We have installed
    application server and oracle forms on London database. We have implemented
    Role Based Access to forms. For this we have created a database role (say ZUR_USER)
    in both databases. The view FRM50_ENABLED_ROLES which is used by forms role based access control
    is also created in both databases with a 'grant select to public'.
    Our form system has a menu and forms under that menu. Both menu and the underlying forms have been
    assigned Menu Security/Item Roles to the above mentioned ZUR_USER role and the role is assigned
    to various users.
    Now a Zurich user is trying to login to Zurich database using the URL for forms installation
    in London server. He can login successfully and can see the menu heading in the main screen but
    when he clicks the menu he doesn't see the underlying forms list.
    When we try the same user id and database from London (using the same URL) we see all the forms.
    Any idea what are we missing. The Menu Security is setup at menu level as well as the form level under
    that menu. User can see the menu but not the form under that menu from Zurich. No such problem while
    login from London.

    I'm using the Forms 10g
    and yes the only difference is between login from Zurich and London.
    Problem definitely is due to Role Based Access setup.
    The user in Zurich can see the Menu but not the items under that menu.
    I have set the security set up at both menu and menu item(i.e. form name) level.

  • Problem in Forms...in 11i

    Hi All,
    i have created a form, and uploaded to respective directory. From apps menu it is calling the form and working fine, but the foreground colour is black...
    So if i highlighted the field then i can see the field value; otherwise full text field is black.
    Do i need to set any thing?
    If I run from directly from form6i, it is showing perfectly fine.
    Rg,
    Subir

    Duplicate thread ..
    Problem in Forms...
    Re: Problem in Forms...!!!

  • Problem in form based authentication

    Hi,
    I am encountering some problem in form based authentication.
    When I try to login for the first time. It reoute me to the image
    directory and not to the request page.
    When I try it for the second time, it shows
    "Form based authentication failed. Could not find session."
    And it always show this message no matter how many time I try.
    I am not sure is it something that I did not set ...
    Thanks for any advice.
    Eric

    Hi Eric,
    It may be a problem in your web.xml, I missed the "/" slash character
    in the web.xml's in <form-login-page> element. So your web.xml
    must look like

  • DB Link problem on form/report 6i

    Greeting
    I have an problem on form 6i with DB Link , that When I have view Using the DB Link and want to use the view on form6i or report 6i, the report not work when call the run file but work through the builder and also on the form not work (Form/ Report 6i With Oracle 11g Release 11.2.0.2.0 - 64bit Production)
    Thanks and appreciated,

    Tony,
    we have both 6i forms for client server for Linux and Sparc and the same forms ported (a year ago) to iAS/iDS 10g R2 just to be able to support the same application when 6i becomes obsolete. The issue of trying/asking/investigating if 6i works or will be certified against 11g or not, is simply to find out if we can support our application on the client/server side when the end users want to move to the new database server version/s. As you know the runtime for the client/server version of 6i is free. But we can not simply recommend our end users to start using 11g db server yet, given that 10gR2 forms are not yet certified against 11g yet. Thank you for your comments not only for this posting but on Forms forum though, I always find them very helpful when making educated decisions. Also knowing that you are a unix person makes your comments more valueable for me, personally.
    R/ Zafer

  • I am facing problem in form no 16

    Hello Gurus,
    i am facing problem in form no 16
    in ECC6.0 ,
    1 where i  get the form no 16
    2 support package & other things so that i can check.
    Please Advised
    Regards
    MHPO

    Std layout was given by SAP. If you do not want to print the form in the layout given by SAP, select Customer Layout and enter the name of the layout created by you. You can create your own layout through transaction SE71.
    Name of the Layout Set .......................... Script name
    Name of Annexure Form.........................Script name
    Name of 12BA Form...............................Script name
    Name of 16AA Form..............................Script name
    These scripts are created by Tech people based on our req....

  • Hindi font problem in forms

    My aplication requires text input in hindi font by implemneting PJC.The pjc is working fine but the text box is not picking correct font from aplication server.I have deployed form on 9i AS.
    Please help.

    Hello All,
    Pls some one respond.
    Am i missing any steps to use unicode fonts in my app....or this is very common problem of forms and unicode fonts....or do i have to register the fonts in any other config files?
    One more info regarding fonts is required.....from where forms load the list of fonts in item property pallete and in layout font selection dropdown...? Since i m not getting same fonts in both the lists.
    Regards,
    Jinesh

  • BLOB in Oracle Forms 6.0

    I have used the following PL/SQL code in Forms 6.0 form, for inserting an Image in the BLOB type column of a database table, taken from windows filesystem.
    DECLARE
         F_LOB BFILE;
         B_LOB BLOB;
    BEGIN
         INSERT INTO IMAGES (IMAGE_ID, IMAGE_FILE) VALUES (1, EMPTY_BLOB());
         SELECT IMAGE_FILE INTO B_LOB FROM IMAGES WHERE IMAGE_ID = 1 FOR UPDATE;
         F_LOB := BFILENAME('BLOB_FILES', 'BlueHills.JPG');
         DBMS_LOB.FILEOPEN(F_LOB);
         DBMS_LOB.LOADFROMFILE(B_LOB, F_LOB, DBMS_LOB.GETLENGTH(F_LOB));
         DBMS_LOB.FILECLOSE(F_LOB);
    EXCEPTION WHEN OTHERS THEN
         MESSAGE(SQLERRM);
         MESSAGE(SQLERRM);
    END;
    When i debug or run the form, it collapses or closes at line # 2 without giving any exception, and hense does'nt inserts the image in the column, where BLOB_FILES is the database directory object mapping to a specific windows file system directory containing images.
    I would be very thankful if anyone can help me out of this problem.

    Dear Gerd Volberg,
    I have:
    Forms Version 6.0.5.0.2
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0
    and with the following statement you have made in ur last post what should I do then:
    only patch 18 is certified against this database 10 g rel. 2.
    I know many problems around blobs and clobs when using too old patch-sets.
    install the newest patch 17 and try it again. 17 is certified against 10g DB rel. 1.
    18 is only for EBS-user, so you are not allowed to install it when not running the E-Business-Suite

  • Blob on db9i & form 6i

    I was working on DB 8i with forms 6i & i upgrade the data base with export/import on data base 9i there is no problem with the data except a blob column is working good with the data imported but when i try to store a new image the db9i accepted and commit the image , whem i try to retrieve this image it doesnot appear ....
    i need your help to solve this problem

    No need for a for loop.
    1. Create the block using the Datablock wizard
    - Base your block on your table "template"
    - include all columns from your table in your block
    - Create your layout, but only display the two columns you want
    - Set the property "Copy value from" to your text-item where you put the template name (should be in another block)
    2. Enter your data
    3. Press "Save" either in your menu, or using the F10-key

  • View BLOB content through Forms 6i URGENT... URGENT...

    I have a table which stores word documents as BLOB. My database is on UNIX machine and I access the database through a Citrix machine through Oracle Forms. My client wishes to open the word document in Forms which is stored in BLOB in the database. My database version is 9.2 which supports me to import and export files from file system to BLOB and vice versa using DBMS_BLOB and UTL_FILE packages. But, my only concern is regarding opening the word document through Forms 6i. Is that possible through OLE or any other means? I've tried all the sources. I know I can do it using Webutil, but it will not work for Forms 6i. Please help me in this regard. I have an urgent release tonight. Please. Please. Please. Please help me. Thanks in advance.

    I know that OLE can solve the problem. But issues is my word document is stored as BLOB in the database. My database is in UNIX. So, I can't export my files into UNIX and open them. I can't view them either from Forms. Please let me know if you have any alternative. Please can you guide me with step by step procedure as to how this can be done if we can do it using OLE.

  • Blob problem (Image storing or Currupted )

    AOA!
    I am working as a developer in a companey. we made a database for HRMS. In this database there is a table EMPLOYEE with a column PICTURE of type BLOB. We were using oracle 8i initially but when we migrate to oracle 9i, we are facing a problem in image storing. The situation is, database showing ur previously stored images (those have stored in oracle 8i) but when we save a new image in that table or any other table it seams to be saved but cannot retrived. I mean when we issue a query
    SELECT EMP_ID FROM EMPLOYEE WHERE PICTURE IS NOT NULL;
    It shows the new inserted records too (thats shows us that picture has been inserted) but when we issue query from a forms6i application it didnt show any image. In case of report, when we try to query a record which newly inserted with image, it says some thing like REPORT IS UNABLE TO SHOW IMAGE FORMATE etc.
    The situation is for all table and all schema which is indicating us may be it is some thing due to oracle 9i headen technique or due to miss managment by us. we dont have DBA in our companey.
    Please help us in this regard. We will be thankfull to you.
    Usman Rana
    Dont reply to above mantioned email my actual email account is [email protected]

    hello,
    these are very specific questions about forms and reports functionality. i would suggest you publish this
    question in the forms and reports forum.
    regards,
    philipp

  • BLOB problem (image storing or image curruption)

    AOA!
    I am working as a developer in a companey. we made a database for HRMS. In this database there is a table EMPLOYEE with a column PICTURE of type BLOB. We were using oracle 8i initially but when we migrate to oracle 9i, we are facing a problem in image storing. The situation is, database showing ur previously stored images (those have stored in oracle 8i) but when we save a new image in that table or any other table it seams to be saved but cannot retrived. I mean when we issue a query
    SELECT EMP_ID FROM EMPLOYEE WHERE PICTURE IS NOT NULL;
    It shows the new inserted records too (thats shows us that picture has been inserted) but when we issue query from a forms6i application it didnt show any image. In case of report, when we try to query a record which newly inserted with image, it says some thing like REPORT IS UNABLE TO SHOW IMAGE FORMATE etc.
    The situation is for all table and all schema which is indicating us may be it is some thing due to oracle 9i headen technique or due to miss managment by us. we dont have DBA in our companey.
    Please help us in this regard. We will be thankfull to you.
    Usman Rana
    Dont reply to above mantioned email my actual email account is [email protected]

    hello,
    these are very specific questions about forms and reports functionality. i would suggest you publish this
    question in the forms and reports forum.
    regards,
    philipp

  • ORA-00932 (Inconsistent datatype) on BLOB field in Forms 6i

    My query is failing with an ORA-00932 when I'm trying to display a blob field using an image type in Forms. It worked fine under 8.1.7DB and now under 9.0.1 it's a problem. It's only a problem when the form is web deployed (using ListenerServlet).
    Any clues?????
    Thanks in advance.

    Bert,
    Im trying to get a 8i blob image into a non-web form Image Item and have had no luck for days. Can you help?
    Dan

  • Blob Problem

    Hello,
    The problem that i have is that i want to insert a file residing in the network into the oracle database into a blob field and again read it from the database and show it ie either insert it into a file directly and then open it using the correct editor or open it directly. I am using java along with it but i am basically stuck on the database side.
    I am sending the code which i have written till date
    i basically need to know
    1)the syntax i am using to interact with the database is right ie where is the error in the code
    2)provided that is ok whether my overall code is on the right track.
    The error message i am getting:
    java.sql.exe:ORA-06550 line col22
    PLS 00302: Component GETCHUNKSIZE must be declared
    ORA-06550 line1 col 7
    pl/sql statement ignoured
    My developopment enviornment is JDeveloper3.0 as this code is having problems compiling in JDK as Jdeveloper overides a few of the jdk classes.
    =========================================================================
    My table structure
    CREATE TABLE DOC_MAS(
    DOC_MAS_SR_NO NUMBER(10),
    PROJECT_NAME VARCHAR2(30),
    MODULE_NO NUMBER(10),
    DOC_NAME VARCHAR2(10),
    DOC_TYPE VARCHAR2(10),
    VERSION NUMBER(10));
    CREATE SEQUENCE SEQ_DOC_MAS START WITH 1 INCREMENT BY 1;
    CREATE SEQUENCE SEQ_DOC_DETAIL START WITH 1 INCREMENT BY 1;
    CREATE TABLE DOC_DETAIL(
    DOC_DETAIL_SR_NO NUMBER(10),
    DOC_MAS_SR_NO NUMBER(10),
    DATE_OF_INSERT DATE,
    ACTUAL_DOC BFILE,
    COMMENTS VARCHAR2(500));
    ===============================================================================
    My connection code:
    public class ConnectionParams {
    // The machine on which the database resides
    //public final static String s_hostName = "insn110a.in.oracle.com";
    public final static String s_hostName = "192.168.1.1";
    // The TNS listener port
    public final static String s_portNumber = "1521";
    // The database name (SID)
    //public final static String s_databaseSID = "otndb";
    public final static String s_databaseSID = "orcl";
    // The database User ID
    public final static String s_userName = "scott";
    // The database user password
    public final static String s_password = "tiger";
    ========================================================================================
    import java.io.*;
    import java.sql.*;
    import oracle.sql.*;
    import oracle.jdbc.driver.*;
    import java.util.*;
    import java.util.Date;
    //import java.math.BigDecimal;
    public class Sample2
    Connection m_connection; //Database Connection Object
    String p_doc_name=null;
    String s_blobvariable = p_doc_name;
    public Sample2()
    dbConnection();
    public static void main(String[] args)
    Sample2 lobs = new Sample2();
    // lobs.dbConnection();
    lobs.readFileNameExt();
    /*This class is for creation of connection =========================================*/
    public void dbConnection() {
    try {
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    String l_dbConnectString =
    "(DESCRIPTION=(ADDRESS=(HOST="+ConnectionParams.s_hostName+")"+
    "(PROTOCOL=tcp)(PORT="+ConnectionParams.s_portNumber+"))"+
    "(CONNECT_DATA=(SID="+ConnectionParams.s_databaseSID+")))";
    m_connection = DriverManager.getConnection(
    "jdbc:oracle:thin:@"+l_dbConnectString,
    ConnectionParams.s_userName, ConnectionParams.s_password);
    // m_connection.setAutoCommit(false);
    System.out.println("Connection Successful");
    Thread.sleep(3000);
    } catch(Exception ex){ //Trap SQL errors
    System.out.println("Error in Connecting to the Database "+ex.toString());
    /*========================================================================================
    File inserting section of the code
    // THIS class gets the input from the file dialog box it gets the file path,projectName and the module no
    //public void readFileNameExt(String p_doc_path,String p_module_no,String p_project_name)
    public void readFileNameExt()
    String p_doc_path = "c:/warea/Mehul2/TABLE5.xls";
    int p_module_no = 10;
    String p_project_name = "Finserve";
    String p_doc_type= null;
    String p_version = null;
    StringTokenizer strtkn = new StringTokenizer(p_doc_path,"/");
    while(strtkn.hasMoreTokens())
    p_doc_name =strtkn.nextToken();
    System.out.println("The file name is" +p_doc_name);
    StringTokenizer strtoken = new StringTokenizer(p_doc_name,".");
    while(strtoken.hasMoreTokens())
    p_doc_type =strtoken.nextToken();
    try{
    System.out.println("The file Type is"+p_doc_type);
    insertDocMas(p_doc_name,p_doc_type,p_project_name,p_module_no);
    Thread.sleep(10000);
    }catch (Exception e){}
    }//end of method
    //============================================== this class is for inserting the doc_mas details in teh table along with version checking
    public void insertDocMas(String p_doc_name,String p_doc_type,String p_project_name,int p_module_no){
    int p_version = -1;
    int p_doc_mas_sr_no = -1;
    // String verision=null;
    int verision;
    String s = null;
    try{
    Statement l_stmt = m_connection.createStatement();
    ResultSet l_version_details = l_stmt.executeQuery("SELECT MAX(VERSION) FROM DOC_MAS WHERE DOC_NAME = '"+p_doc_name+"'");
    if (l_version_details.next())
    { System.out.println("The Control 1");
    verision = l_version_details.getInt(1);
    System.out.println("The Control 2 : "+verision);
    verision = verision +1;
    else {
    verision = 1;
    System.out.println("The Control 3");
    p_version = verision;
    System.out.println("The value of p_version" + p_version);
    l_version_details.close();
    l_stmt.close();
    Thread.sleep(4000);
    }catch(Exception e){
    System.out.println("Exception has occured at the time of insert"+e);
    /* try{
    Statement stmt = m_connection.createStatement();
    ResultSet rset = stmt.executeQuery("select DEPTNO,DNAME,LOC from DEPT");
    while(rset.next()){
    BigDecimal deptno = rset.getBigDecimal(1,2);
    String dname = rset.getString(2);
    // Timestamp hiredate = rset.getTimestamp(3);
    String loc = rset.getString(3);
    System.out.println(deptno+" "+dname+" "+loc);
    Thread.sleep(50000);
    }catch(Exception e){System.out.println(e);}
    try{
    Statement l_stmt = m_connection.createStatement();
    ResultSet l_seq_details = l_stmt.executeQuery("SELECT SEQ_DOC_MAS.NEXTVAL FROM DUAL");
    if (l_seq_details.next())
    p_doc_mas_sr_no = l_seq_details.getInt(1);
    System.out.println("The Control AA");
    System.out.println("The value of p_doc_mas_sr_no" + p_doc_mas_sr_no);
    l_seq_details.close();
    l_stmt.close();
    Thread.sleep(4000);
    }catch(Exception e){
    System.out.println("Exception has occured at the time of selecting the current sequence number"+e);
    try {
    System.out.println("Creating rows in DOC_MAS.. ");
    System.out.println("The Control VV");
    PreparedStatement l_pstmt = m_connection.prepareStatement("insert into DOC_MAS(DOC_MAS_SR_NO,PROJECT_NAME,MODULE_NO,DOC_NAME,DOC_TYPE,VERSION) values(?,?,?,?,?,?)");//SEQ_DOC_MAS.nextval
    l_pstmt.setInt(1,p_doc_mas_sr_no);//"SEQ_DOC_DETAIL.NEXTVAL"
    l_pstmt.setString(2,p_project_name);
    l_pstmt.setInt(3,p_module_no);
    l_pstmt.setString(4,p_doc_name);
    l_pstmt.setString(5,p_doc_type);
    l_pstmt.setInt(6,p_version);
    l_pstmt.executeUpdate(); // Execute SQL statement
    l_pstmt.close();
    System.out.println("The Control 3");
    // Close statement
    Thread.sleep(20000);
    }catch(Exception e){
    System.out.println("Exception has occured at the time of insert11"+e);
    try{System.out.println("The Control 4");
    Statement l_statement = m_connection.createStatement();
    ResultSet l_doc_mas_sr_no = l_statement.executeQuery(
    "SELECT max(DOC_MAS_SR_NO) FROM DOC_MAS "+
    "WHERE DOC_NAME = '"+p_doc_name+"' ");//FOR UPDATE
    if (l_doc_mas_sr_no.next())
    p_doc_mas_sr_no = l_doc_mas_sr_no.getInt(1);
    l_doc_mas_sr_no.close();
    l_statement.close();
    System.out.println("The Control 5");
    Thread.sleep(10000);
    }catch(Exception e){
    System.out.println("Exception has occured at the time of insert");
    loadSamples(p_doc_mas_sr_no,p_doc_name,p_doc_type);
    }//Method insertDocMas() closing here
    /*This class is for loading the data into the database==================================*/
    public void loadSamples(int p_doc_mas_sr_no,String p_doc_name,String p_doc_type) {
    int p_doc_detail_sr_no = -1;
    Date p_sysdate = new Date() ;
    try{
    Statement l_stmt = m_connection.createStatement();
    ResultSet l_seq_doc_details = l_stmt.executeQuery("SELECT SEQ_DOC_DETAIL.NEXTVAL FROM DUAL");
    if (l_seq_doc_details.next())
    p_doc_detail_sr_no = l_seq_doc_details.getInt(1);
    System.out.println("The Control AA");
    System.out.println("The value of p_doc_detail_sr_no" + p_doc_detail_sr_no);
    l_seq_doc_details.close();
    l_stmt.close();
    Thread.sleep(4000);
    }catch(Exception e){
    System.out.println("Exception has occured at the time of selecting the current sequence number"+e);
    try{
    Statement l_st = m_connection.createStatement();
    ResultSet l_date = l_st.executeQuery("SELECT sysdate FROM DUAL");
    if (l_date.next())
    p_sysdate = l_date.getDate(1);
    System.out.println("The Control sysdate");
    System.out.println("The value of p_sysdate" + p_sysdate);
    l_date.close();
    l_st.close();
    Thread.sleep(4000);
    }catch(Exception e){
    System.out.println("Exception has occured at the time of selecting the sysdate"+e);
    try {System.out.println("The Control 6");
    System.out.println("Creating row for actual-doc in DOC_DETAILS.. ");
    PreparedStatement l_pstmt = m_connection.prepareStatement("insert into DOC_DETAIL(DOC_DETAIL_SR_NO,DOC_MAS_SR_NO,DATE_OF_INSERT,ACTUAL_DOC)values(?,?,p_sysdate, empty_blob() )");
    l_pstmt.setInt(1,p_doc_detail_sr_no);
    l_pstmt.setInt(2,p_doc_mas_sr_no);
    //l_pstmt.setDate(3,p_sysdate);
    System.out.println("The Control 6AA");
    l_pstmt.execute(); // Execute SQL statement
    l_pstmt.close(); // Close statement
    System.out.println("Created.\nLoading <map.gif> into BLOB column for doc_detail...");
    System.out.println("The Control 7");
    // Retrieve the row just inserted, and lock it for insertion of the
    }catch(Exception e){
    System.out.println("Exception has occured at the time of inserting blob locators"+e);
    try {
    // LOB columns.
    System.out.println("The Control 7AAA");
    Statement l_stmt = m_connection.createStatement();
    ResultSet l_lobDetails = l_stmt.executeQuery(
    "SELECT ACTUAL_DOC "+
    "WHERE DOC_MAS_SR_NO = '"+p_doc_mas_sr_no+"'");
    // Retrieve BLOB and CLOB streams for ACTUAL_DOC and TEXT_DOC
    // columns, and load the sample files
    System.out.println("The Control 8");
    if (l_lobDetails.next())
    // Get the BLOB locator and open output stream for the BLOB
    BLOB l_mapBLOB = ((OracleResultSet)l_lobDetails).getBLOB(1);
    OutputStream l_blobOutputStream = l_mapBLOB.getBinaryOutputStream();
    System.out.println("The Control 9");
    // Open the sample file as a stream for insertion into the BLOB column
    File l_blobvariable = new File(s_blobvariable);
    InputStream l_sampleFileStream=new FileInputStream(l_blobvariable);
    System.out.println("The Control 10");
    // Buffer to hold chunks of data to being written to the BLOB.
    // In Oracle8.1.5 JDBC drivers a method getBufferSize() is available
    // in the BLOB class, that returns the optimal buffer size
    byte[] l_buffer = new byte[10* 1024];
    System.out.println("The Control 11");
    // Read a chunk of data from the sample file input stream, and write the
    // chunk to the BLOB column output stream. Repeat till file has been
    // fully read.
    int l_nread = 0; // Number of bytes read
    while ((l_nread= l_sampleFileStream.read(l_buffer)) != -1) // Read from file
    l_blobOutputStream.write(l_buffer,0,l_nread); // Write to BLOB
    System.out.println("The Control 12");
    // Close both streams
    l_sampleFileStream.close();
    l_blobOutputStream.close();
    System.out.println("Done Loading sample files");
    System.out.println("\nRetrieving and displaying sample files..");
    // Retrieve and display the LOB data just inserted
    drawBLOB(l_mapBLOB,p_doc_name,p_doc_type);
    //System.out.println("Done loading and displaying LOB data");
    } //if statement closes here
    l_lobDetails.close();// Close Result Set and statement
    l_stmt.close();
    } catch (Exception ex)
    { // Trap       SQL errors
    System.out.println("Error loading sample files for the selected airport");
    System.out.println("\n"+ex.toString());
    }//Method closes here
    * Retrieve the BLOB data from input BLOB column into a local file,
    * and draws the image. The file type needs to be added here
    public void drawBLOB(BLOB p_blob, String p_doc_name,String p_doc_type) {
    //String fileType this should be passed at some point to ensure that the file gets the right extension
    try {
    // Open a stream to read the BLOB data
    InputStream l_blobStream = p_blob.getBinaryStream();
    // Open a file stream to save the BLOB data
    FileOutputStream l_fileOutStream = new FileOutputStream(p_doc_name+"."+p_doc_type);
    // Read from the BLOB data input stream, and write to the file output
    // stream
    byte[] l_buffer = new byte[10]; // buffer holding bytes to be transferred
    int l_nbytes = 0; // Number of bytes read
    while ((l_nbytes = l_blobStream.read(l_buffer)) != -1) // Read from BLOB stream
    l_fileOutStream.write(l_buffer,0,l_nbytes); // Write to file stream
    // Flush and close the streams
    l_fileOutStream.flush();
    l_fileOutStream.close();
    l_blobStream.close();
    //m_GUI.drawMap(p_doc_name,p_doc_type);
    // Draw retrieved image to GUI
    drawMap(p_doc_name,p_doc_type);
    } catch (Exception ex) { // Trap SQL and IO errors
    System.out.println("Error in retrieving and drawing map for selected airport");
    System.out.println("\n"+ex.toString());
    * Create a label from the image filepassed, add the label to the image area
    This part will have to be modified majorly
    public void drawMap(String p_doc_name,String p_doc_type) {
    //Refer to SIRExtOpen.java
    Runtime r = Runtime.getRuntime();
    Process p = null;
    if (p_doc_type.equals("html")&#0124; &#0124;p_doc_type.equals("htm"))
    try{
    p = r.exec( "C:\\Program Files\\Internet Explorer\\Iexplore.EXE " + p_doc_name);
    //repaint();
    p.waitFor();
    catch(Exception ex)
    ex.printStackTrace();
    System.out.println(ex);
    System.out.println(ex.getMessage());
    if(p_doc_type.equals("txt")&#0124; &#0124; p_doc_type.equals("sql")&#0124; &#0124; p_doc_type.equals("java"))
    try
    p = r.exec( "C:\\WINDOWS\\notepad.EXE " + p_doc_name); p.waitFor();
    catch(Exception ex)
    ex.printStackTrace();
    System.out.println(ex);
    System.out.println(ex.getMessage());
    } // end of txt , sql , java if
    if(p_doc_type.equals("xls"))
    try
    p = r.exec( "C:\\Program Files\\Microsoft Office\\Office\\excel.EXE " + p_doc_name);p.waitFor();
    catch(Exception ex)
    ex.printStackTrace();
    System.out.println(ex);
    System.out.println(ex.getMessage());
    } // end of xls if
    if(p_doc_type.equals("fmb"))
    try
    p = r.exec( "C:\\Program Files\\Accessories\\wordpad.exe " + p_doc_name);p.waitFor();
    catch(Exception ex)
    ex.printStackTrace();
    System.out.println(ex);
    System.out.println(ex.getMessage());
    } // end of fmb if
    if(p_doc_type.equals("doc"))
    try
    p = r.exec( "C:\\Program Files\\Accessories\\wordpad.exe " + p_doc_name);p.waitFor();
    catch(Exception ex)
    ex.printStackTrace();
    System.out.println(ex);
    System.out.println(ex.getMessage());
    } // end of doc if
    if(p_doc_type.equals("mpp"))
    try
    p = r.exec( "C:\\Program Files\\Accessories\\wordpad.exe " + p_doc_name);p.waitFor();
    catch(Exception ex)
    ex.printStackTrace();
    System.out.println(ex);
    System.out.println(ex.getMessage());
    } // end of mpp if
    //Here you can write a statement for deleting the file in the root directory once the file is opened using any editor
    }//end of method
    }//This is the class closing
    * This method is called when a row is selected from the combo.
    * It checks if there exists data in DOC_DETAIL for the selected
    * file. If there exists data, it calls drawBLOB and writeCLOB to
    * display the data
    /*public void fileSelected(String p_doc_mas_sr_no,String p_doc_name,String p_doc_type) {
    try {
    System.out.println("Retrieving LOB details for selected file..");
    // Create a SQL statement
    Statement l_stmt = m_connection.createStatement();
    // Query DOC_DETAILS for the selected file
    java.sql.ResultSet l_lobDetails = l_stmt.executeQuery(
    "SELECT ACTUAL_DOC FROM DOC_DETAILS "+
    "WHERE DOC_MAS_SR_NO='"+p_doc_mas_sr_no+"'");
    // Check if LOB columns exist
    if (l_lobDetails.next()) {
    // LOB details exist
    // Display airport map and suggestion book (LOB details)
    drawBLOB(l_lobDetails.getBlob(1),p_doc_name,p_doc_type);
    //lobs.drawBLOB(((OracleResultSet)l_lobDetails).getBLOB(1),p_doc_name,p_doc_type);
    //Should this be like this
    System.out.println("Done retrieving and displaying LOB details");
    } else {
    // No LOB details
    // m_GUI.m_loadButton.setEnabled(true);
    //TO BE CHECKED OUT LATER m_loadButton This is a button in the form
    System.out.println("No airport map and suggestion book exist for selected airport");
    System.out.println("\nPress <Load Sample2 Files> to load LOB details");
    l_lobDetails.close();
    l_stmt.close();
    } catch (Exception ex) { // Trap SQL errors
    System.out.println("Error retrieving LOB Details for the selected airport");
    System.out.println(ex.toString());

    You are probably better off using BLOBs rather than BFILEs. The main reason for this is that with BLOBs data integrity between file and its meta data in the database are managed and protected by the RDBMS. BFILEs are useful for legacy systems where the files already exist in some form of meaningful and managed structure that needs to be preserved.
    There is a down side to BLOBs and that is performance - BLOBs are relatively slow to load into the database. However, its not too bad and the performance of extracting BLOBs out from the database is quite reasonable the bottleneck is more likely to be your LAN.
    In order to use BLOBs it is important to have the right class libraries involved. For BLOBs you must use the classes12.zip (supplied with the database) for JDBC2 support and furthermore put this class high up the list of class libraries if you do not you may find that your code compiles but raises a runtime exception about invalid data types; this is because the wrong definition of the Blob class is being picked up.
    Assuming that you are using BLOBs then the following describes the techniques for storing files as BLOBs in an Oracle database.
    LOADING BLOBS
    Assuming that you have a table with a BLOB column in it then to load a BLOB you must first create the record containing the BLOB by inserting a row into your table with the value of the BLOB column set to EMPTY_BLOB( ) (PL/SQL built in):
    INSERT INTO tablex( col1, col2, colBLOB )
    VALUES( val1, val2, EMPTY_BLOB() )
    Then you must row lock this record and obtain the LOB locator for the BLOB just created:
    stmt = connection.createStatement();
    query = "SELECT colBLOB FROM tablex WHERE ... FOR UPDATE OF colBLOB";
    ResultSet lockLOBSet = stmt.executeQuery(query);
    At this point you should be able to use lockLOBSet.getBlob(1) to create a binary stream to load the BLOB directly into the database. Under Java Developer 2 I could never get this to work and havent tried since with Java Developer 3. Instead I used the PL/SQL DBMS_LOB package and did it using JDBC; this assumes that the file has been loaded into a buffer binaryFile and note that the maximum chunk size that dbms_lob.write can be called with is 32K:
    blobLoc = lockLOBSet.getBlob(1);
    while(amountWritten < fileSize)
    if ((amountWritten + writeAmount) <= fileSize)
    writeAmount = 32000;
    else
    writeAmount = fileSize - amountWritten;
    System.arraycopy(binaryFile, amountWritten, buffer, 0, writeAmount);
    CallableStatement cstmt =
    connection.prepareCall("{call dbms_lob.write(?, ?, ?, ?)}");
    cstmt.setBlob(1, blobLoc);
    cstmt.setLong(2, writeAmount);
    cstmt.setLong(3, amountWritten + 1);
    cstmt.setBytes(4, buffer);
    cstmt.execute();
    cstmt.close();
    amountWritten = amountWritten + writeAmount;
    EXTRACTING BLOBS
    Binary streams do work when it comes to reading BLOBs out of the database so things are a whole lot simpler probably worth trying it with loading BLOBs now as well.
    ResultSet queryLOBSet = statement.executeQuery(query);
    if(queryLOBSet.next())
    lobSize = queryLOBSet.getInt(1);
    blobLoc = queryLOBSet.getBlob(2);
    BufferedInputStream bi;
    blobBuffer = new byte[lobSize];
    bi = new BufferedInputStream(blobLoc.getBinaryStream());
    amountRead = bi.read(blobBuffer);
    bi.close();
    Regards,
    Bob
    null

Maybe you are looking for

  • The first line in a file is supressed

    hi all, i have a really weird problem. i have a file with a lot of data and i am using a file adapter with file content conversion to parse it. the file adapter is a sender one. the problem come when i do read the file and then it ignore the first li

  • Dbmail status is 'sent' in the sysmail_sentitems table but mail not received

    Hi, Suddenly from yesterday, we have not been receiving any of our notification mails from any of our servers (Dev/Prod/UAT).No changes were made to email operator . All the mails are available in the sysmail_sentitems table and not available in sysm

  • Configuraration of shared services

    Hi I have installed 11.1.1.3 ,successfully and configured shared services slao success but when i configured with essbase Register with Shared Services is failed ,please tell me what could be the reason . Thanks Ravi

  • Different order units in info records

    Hi, I need to have different order units for different Plants in Info Records. I find this field only at general level. How can I solve this problem? Can anyone help me? Thanks. Marí

  • SAP ECC 6.0 on Fedora

    Hi, Please let me know, can i install sap ecc 6.0 on fedora 10.0 or 11.0.