OraOLEDB provider 8.1.7.3 - BLOB problem

Hi,
We are using Oracle Provider OraOLEDB 8.1.6 earlier and BLOB is reading Properly...Now I upgraded the provider to OraOLEB 8.1.7.3...Now all BLOB/LONG fields are read as NULL...Same code works perfectly fine with OraOLEDB 8.1.6...
Did we have to change any where specifically for reading BLOB in the case of OraOLEDB 8.1.7.3?
Can anyone help since this is very urgent for my develoment work...
Regards
Zunil

oh ... I forgot to say ..
when I run query under Enterprise Manager as
select * from Openquery (db, 'select * from table')
then it will show me a pop-up message
"Query Designer encountered a MS Design Tools error:
ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]OLE DB provider 'OraOLEDB.Oracle' reported an error.
[Microsoft][ODBC SQL server Driver][SQL Server][OLE/DB provider returned message: ORA-12545: Connect failed because target host or object does not exist]
And I follow support.microsoft.com/support/complus/mtsandoracle.asp?SD=GN&LN=EN-US&gssnb=1,setting as follow
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSDTC\MTxOCI]
"OracleXaLib"="oraclient8.dll"
"OracleSqlLib"="orasql8.dll"
"OracleOciLib"="oci.dll"

Similar Messages

  • Oracle ORAOLEDB Provider removes trailing blanks in parameter values of Type IN CHAR

    Hi,
    I often use StoredProcedures With Ref_Cursor parameters to read data from an Oracle 11g DB.
    Because we use VARCHAR2 columns in our tables, we have to pad blanks for an exact match, the Input Parameter has to contain For example "WW2 ",
    This was working fine over the years using the Microsoft-Ado Provider MSDAORA ( with Excel 10, VBA ).
    Now we want to use the Oracle ORAOLEDB Provider. In our tests all resultsets were empty(rs.EOF/rs.BOF)
    The reason is, that inside the StoredProcedure  the ParameterValue was trimmed ( "WW2" ), and so the Where-Clause doesn't match.
    Is it possible to change this behaviour( bug or bad feature ? ) by setting a property of an object , in registry or somewhere else ?
    I am aware of the differences between the two character types VARCHAR2 / CHAR ( blankpadded / no blankpadded compare ).
    But the parameters of the stored procedure is CHAR (fixed length). and in this case strings are usually padded with blanks, and so I think, that no component has to modify a fixed length object,
    especially if the length of the parameter is a hard setting in vba code( Set Param = SqlCmd.CreateParameter("strAnlage", adChar, adParamInput, 4) , and in PL/SQL : strAnlage IN CHAR ).
    Thanks.
    Best regards
    Dirk

    Can you post how you are trying to call the procedure from a package body?
    Check this:
    SQL> create or replace package hits_11 as
      2  procedure my_process(a number);
      3  end;
      4  /
    Package created.
    SQL> create or replace package body hits_11 is
      2  procedure my_process(a number) is
      3  begin
      4  dbms_output.put_line(a);
      5  end;
      6  end;
      7  /
    Package body created.
    SQL> exec hits_11.my_process;
    BEGIN hits_11.my_process; END;
    ERROR at line 1:
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'MY_PROCESS'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    SQL> exec hits_11.my_process(1);
    1
    PL/SQL procedure successfully completed.
    SQL>

  • HT1414 I am going through the process of unlocking my iphone 4 and have had all the go aheads from my service provider but i am still having problems when i plug the phone into itunes. Has anyone else had this program

    I am going through the process of unlocking my iphone 4 and have had all the go aheads from my service provider but i am still having problems when i plug the phone into itunes. Has anyone else had this problem??

    Umm, what problem?  What actually happens when you try to restore it in iTunes?

  • MTS, OraOLEDB provider, and Connection Pooling

    I have read through "Using Microsoft Transaction Server with Oracle8" (http://technet.oracle.com/doc/oracle8i_816/nt.816/a73029/prog.htm#1082299) and the OraOLEDB provider document, and found little coverage in regard to the subject of "Connection Pooling." Could you point me to additional documentation and code samples that would help guide me in designing my application.
    I am designing a web based distributed application subsystem with MTS/COM+, OraOLEDB provider (8.1.7.2.0), Oracle Services for MTS (8.1.7.0.0) and Oracle 8i (8.1.6). A major requirement of this subsystem is that it scales well as it is utilized by more and more applications and users. This requirement could be accomplished much easier if the OraOLEDB Provider provides Connection Pooling. Much of the documentation I have seen from Microsoft describes Connection Pooling using ODBC. The documentation from Oracle discusses Connection Pooling with OO4O or OCI. Does the OraOLEDB Provider provide Connection Pooling? If so could you point me to additional documentation and samples?
    Thanks,
    Bryan Wood

    I am facing the same issue. This is strange, no one has responded to this for a year. What does it mean? It sux so bad that no one uses OmniPortlet? It's clear when you execute a sql thru this stupid OmniPortlet it opens a connection and never releases it. I have seen this by turning off everything and keep refreshing the OmniPortlet.
    What bothers me more is that there seems to be no freakn documentation on this especially around how to do this from the console and how to use the jndi datasource. There has to be a way. Please help us out on this either from inside or outside oracle.
    The world class Oracle support seems to be a joke.

  • I cannot use face time on 3G my provider is BT is this the problem  wire less is working fine for face time

    I cannot use face time on 3G my provider is BT is this the problem on wireless it works fine
    Regards Malcolm

    Your carrier must support using FaceTime when connected to their cellular network.

  • 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

  • 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

  • Blob Problem (storing Images)

    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]

    I think that both your SQL is wrong and your intended use is wrong. According to the SQL reference, the following seems to be a simplified definition that seems to match what you're trying to do. UPDATE &lt;table&gt; SET &lt;column&gt; = &lt;expr&gt;. So PROPERTIES should be a &lt;table&gt; of some kind and X should be a &lt;column&gt; of that table. This changes your PreparedStatement to *"UPDATE PROPERTIES SET X = ? WHERE NAME = ?"* Then you can do ps.setBlob(1, b) and ps.setString(2, ...). Because your statement is DML you must do ps.executeUpdate(). So your code might look something like this.
    Blob b = ...;
    String x = ...;
    ps = c.prepareStatement("UPDATE PROPERTIES SET X = ? WHERE NAME = ?");
    ps.setBlob(1, b);
    ps.setString(2, x);
    int i = ps.executeUpdate();
    The executeUpdate() returns the row count (i.e. number of rows) of your DML statement. Try that and see if it helps.

  • Blob Problem (image not store or currup in database)

    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

    I have a mistake , the right code is :
    <listobject:create name="mylist" columns="field,value" />
         <listobject:addrow name="mylist">
              <listobject:argument name="field" value="historyAttr1" />
              <listobject:argument name="value" value="1234" />
         </listobject:addrow>

  • 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]

  • Asp blob problem?

    Hi All,
    i upload an image from asp to blob field,but i can't display the image in asp.
    while i write an image from vb to blob ,i can display the image.
    i have read the sample code Use interMedia with OO4O and Microsoft IIS to load and retrieve rich content in InterMedia sample. the code have the same problem.
    i don't know what to do.
    help me.
    thanks

    I am using 2.2. It outputs the folowing html
    <a id="ad" href="http://portaldev.cmcinet.org/portal/server.pt/gateway/PTARGS_0_612_546_208_0_43/http%3B/portaldev.cmcinet.org/cmcportlets/adbanner/webform2.aspx">
    <img src="http://portaldev.cmcinet.org/portal/server.pt/gateway/PTARGS_0_612_546_208_0_43/http%3B/portaldev.cmcinet.org/cmcportlets/adbanner/image.jpg" alt="Community Medical Organisation" border="0" /></a>
    I believe they work different from imagebuttons. Just crate a page and add an adrotator control to it and read the images from some xml file. I can send you the code.

  • RDB BLOB problem

    Hi.
    I have problem writing blob into RDB database table via JDBC driver. I use setBinarySteam() or setBytes() method in PreparedStatement.
    If table has NOT NULL constraint on blob-field I'm trying to write JDBC driver throws exception:
    java.sql.SQLException: in <rdbjdbcsrv:execute_into>
    %RDB-E-INTEG_FAIL, violation of constraint NEW_BLOB_TABLE_NOT_NULL1 caused operation to fail
    -RDB-F-ON_DB, on database DKB1:[PRO_DB.MB_DATABASE]MB.RDB;1
    @rdb.Client.ExecuteInsert
         at oracle.rdb.jdbc.common.BasicClient.throwException(BasicClient.java:1049)
         at oracle.rdb.jdbc.common.BasicClient.throwException(BasicClient.java:1014)
         at oracle.rdb.jdbc.common.Client.ExecuteInsert(Client.java:498)
         at oracle.rdb.jdbc.rdbThin.Rdb.ExecuteInsert(Rdb.java:332)
         at oracle.rdb.jdbc.common.ResultSet.doStatement(ResultSet.java:5894)
         at oracle.rdb.jdbc.common.PreparedStatement.execute(PreparedStatement.java:1331)
         at oracle.rdb.jdbc.common.PreparedStatement.executeUpdate(PreparedStatement.java:399)
         at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:101)
         at ru.teleform.reportgenerator.db.ReportBroker.setBinaryStream(ReportBroker.java:188)
         at ru.teleform.reportgenerator.servlets.test.doPost(test.java:18)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
         at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
         at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
         at java.lang.Thread.run(Thread.java:619)
    But if there is no constraint on this field everyyhing is ok. I'm using thin JDBC-driver.
    I don't know what to do.

    No, I'm not trying to set null value to this field.
    For experiment I created two similar tables. One was created with NOT NULL constraint for blob column and the other one without.
    And I execut identical insert-query on both of them. With first table query throws exception. And with second one everything is fine, query inserts correct data into this table.

  • I am having problems attaching files to my email using the latest Firefox 13.0.1, Comcast is my internet provider, but I did not have problem with Safari.

    Why am I having problems attaching files to my email using Firefox 13.0.1.?
    I am using a MAC, OS 10.6.8, and have Comcast as my internet provider. I noticed after I upgraded to Firefox 13.0.1 that I am having problems attaching files to my email. I do not experience the same problem with Safari, but I prefer to use Firefox, as all of my bookmarks and passwords are saved there. I just like the way Firefox works better than Safari.
    I am a free-lance graphic designer and rely on my internet connection to my customers. I need this resolved ASAP!

    Could you start by resetting the zoom level on the page? To do that, you can either:
    * Press Ctrl+0 (that's a zero) on the keyboard
    * View menu > Zoom > Reset
    You also can use zoom to increase/decrease the size from there. This article describes the various mouse, keyboard, and menu methods: [[Font size and zoom - increase the size of web pages]].
    Any luck?

  • Tomcat 4.1 Oracle Blob problem using apache commons DBCP

    Hi all,
    We are using Tomcat 4.1.12, Java 1.4.x and trying to take advantage of the connection pooling that comes with Tomcat(the apache commons DBCP).
    We are connecting to a oracle database.
    Works fine for everything EXCEPT Blobs. We have a servlet that serves images from Oracle, that works fine when it doesn't use the connection pooling, but throws an exception when we call the
    ERROR: Class:DisplayGraphic Method:processRequest(HttpServletRequest request, Ht
    tpServletResponse response)
    Exception: org.apache.commons.dbcp.DelegatingResultSet
    DataSource ds = (DataSource)ctx.lookup("jdbc/db_connection");
    Connection conn = ds.getConnection();
    PreparedStatement pstmt = null;
    ResultSet rs = null;
    pstmt = conn.prepareStatement("SELECT graphic FROM graphics WHERE graphic_id = 1");
    rs = pstmt.executeQuery();
    if(rs.next())
        oracle.sql.BLOB oBlob = ((OracleResultSet) oRS).getBLOB("GRAPHIC");
        InputStream oIS =  oBlob.getBinaryStream();
        ... etc etc...
    }Any ideas?
    Cheers,
    Alex.

    solved the problem.. i was using getBLOB instead of
    getBlob
    doh..Hi Alex,
    your problem is very interesting for me because I have a similar problem and your identical configuration...
    the instruction
    oracle.slq.BLOB aBlob = ((OracleResultSet)super.mRs).getBLOB("BLOBBONE")
    causes this:
    java.lang.ClassCastException: org.apache.commons.dbcp.DelegatingResultSet
    To resolve this, I changed, in server.xml , the factory
    <parameter>
                        <name>factory</name>
                        <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
                   </parameter>
    with:
    <parameter>
    <name>factory</name>
    <value>oracle.jdbc.pool.OracleDataSourceFactory</value>
    </parameter>          
    and magically all works fine...
    But the question is... Why doesn't it work with the standard factory???
    There is a problem in the CLASSPATH that I don't see?
    Any suggestions is welcome!
    Thanks in advance!
    Giselda

Maybe you are looking for

  • TRansport Request Error

    Hi Team, I am facing a error while importing a transport request. Whenever i import a request , i am getting a popup showing Predessor transport need to be imported . But my predessor Transport request is already imported. Can you explain this why I

  • Trying to add a loading page

    Suppose I have an image called " myLoading " loaded with visible=false on canvasPage. En my code is something on the likes of myLoading.visible=true; code myLoading.visible=false. But this is not working. Also, I am aware that the section between  /*

  • New Address Book contacts insert leading space into Notes field

    When I create a new contact from scratch in Address Book (4.1) the Notes field at the bottom contains leading spaces / tabs. (I can't tell which). This means that information I type in at the bottom looks unusually formatted. This behaviour (I seem t

  • ITunes stopped working! What is the solution?

    I Tunes stopped working! This is the message that I receive when I try to open the iTunes. I deleted the software and downloaded again on my PC ( Windows 7). Connecting the iPhone 4 does not open the iTuness automatically.

  • MIFI 4510L Unable to connect to the Internet

    MIFI 4510L says I am connected but I am unable to access the internet.  Is there still an outage going on?  I have had no internet connection for a few days now.  The tower near me here in Michigan appears to be out yet VZ says the outage has been fi