Insert jpeg image to blob

Hi Friends,
I have an image located at c:\krissy.jpg
I want to load this image (insert) to a table column (photo1 BLOB) using SQLDev
Can it be possible?
Thanks a lot

yeah dear..I follow the same steps....i can see also in the file name the fault ".blob" extension it display. Then I overwrite it with a.jpg and I also changethe default directory to c:\ ....but when I 'ok' the save. I can not find any a.jpg in the c:\ dir.....
Its only this, overwrite with your file name.
could I missed somthing? do i have to enter the file-type window which i could not enter any.I imagine that yes, but... have You permissions?
It tries to save the file in another dir.
The your SQL Developer is in the last version (1.2.1 - 32.13)?
Your db version is..?
For me its worked fine, with 10gR2, WinXPSP2, SQL Developer 1.2.1 - 32.13...

Similar Messages

  • How can I insert jpeg images into a PDF's Header and Footer?

    International Clients send me a lot of pdf price lists (hundreds).  I want to be able to easily add our letterhead header and footer jpegs to my Acrobat one time so that I can then have them easily placed and printed on each new original document I receive when I (re)print them as a new (compressed) pdf.   This will streamline my work so that when I send them out and they start circulating among Buyers they can clearly see that we are the US contact for XYZ Client?
    Thank you.

    If you add a background or water mark, as opposed to a footer/header, you can specify an image to use.
    You can also use JavaScript to add a custom toolbar button or menu item so that you can easily add the images to a documant, or even in a batch process, using a variety of methods. Post again if you'd like more information.

  • Jagged edges around inserted jpeg images

    Hi There
    I am using Adobe Acrobat Professional 8 in Windows 7 Professional 64 bit
    When producing pdf's using Adobe Acrobat Pro 8 with the setting on high quality the images produced have very jagged edges (Jaggies) especially around logo's & imported images, not so much on text.
    This has also been reflected in material that has come back from an external print job.
    I had this problem on my olf pc & believe the fix for this was located somewhere in the advanced section of properties menu but i have not been able to find it.
    Any help or suggestions would be greatly appreciated. 
    Thanks
    Darren

    It's best to try the smothing. In some cases with smothing on its too extreme and you go from Jaggies to Fuzzy looking Type. Sometimes so bad that its actually looks better with Jaggies, any thing below 8pt should not have font smoothing. In Acroabt it's all or nothing.

  • Compression of jpeg image

    Hi,
    I am not too familiar with images technology but I read that jpeg is alrady a compressed file. Will there be any space gain if I save jpeg image in BLOB or CLOB column and compress?
    Regards,
    Asim

    If you can save a JPEG in a CLOB you are a far better developer than I. <g>
    There may be some compression though likely not much. What I would suggest is that in 10g or below you look at UTL_COMPRESS
    http://www.psoug.org/reference/utl_compress.html
    and in 11g, additionally, you look at SECURE FILES and DEDUPLICATION
    http://www.psoug.org/reference/securefiles.html

  • How to insert a pdf or jpeg image into a blob column of a table

    How to insert a pdf or jpeg image into a blob column of a table

    Hi,
    Try This
    Loading an image into a BLOB column and displaying it via OAS
    The steps are as follows:
    Step 1.
    Create a table to store the blobs:
    create table blobs
    ( id varchar2(255),
    blob_col blob
    Step 2.
    Create a logical directory in the database to the physical file system:
    create or replace directory MY_FILES as 'c:\images';
    Step 3.
    Create a procedure to load the blobs from the file system using the logical
    directory. The gif "aria.gif" must exist in c:\images.
    create or replace procedure insert_img as
    f_lob bfile;
    b_lob blob;
    begin
    insert into blobs values ( 'MyGif', empty_blob() )
    return blob_col into b_lob;
    f_lob := bfilename( 'MY_FILES', 'aria.gif' );
    dbms_lob.fileopen(f_lob, dbms_lob.file_readonly);
    dbms_lob.loadfromfile( b_lob, f_lob, dbms_lob.getlength(f_lob) );
    dbms_lob.fileclose(f_lob);
    commit;
    end;
    Step 4.
    Create a procedure that is called via Oracle Application Server to display the
    image.
    create or replace procedure get_img as
    vblob blob;
    buffer raw(32000);
    buffer_size integer := 32000;
    offset integer := 1;
    length number;
    begin
    owa_util.mime_header('image/gif');
    select blob_col into vblob from blobs where id = 'MyGif';
    length := dbms_lob.getlength(vblob);
    while offset < length loop
    dbms_lob.read(vblob, buffer_size, offset, buffer);
    htp.prn(utl_raw.cast_to_varchar2(buffer));
    offset := offset + buffer_size;
    end loop;
    exception
    when others then
    htp.p(sqlerrm);
    end;
    Step 5.
    Use the PL/SQL cartridge to call the get_img procedure
    OR
    Create that procedure as a function and invoke it within your PL/SQL code to
    place the images appropriately on your HTML page via the PL/SQL toolkit.
    from a html form
    1. Create an HTML form where the image field will be <input type="file">. You also
    need the file MIME type .
    2. Create a procedure receiving the form parameters. The file field will be a Varchar2
    parameter, because you receive the image path not the image itself.
    3. Insert the image file into table using "Create directory NAME as IMAGE_PATH" and
    then use "Insert into TABLE (consecutive, BLOB_OBJECT, MIME_OBJECT) values (sequence.nextval,
    EMPTY_BLOB(), 'GIF' or 'JPEG') returning BLOB_OBJECT, consecutive into variable_blob,
    variable_consecutive.
    4. Load the file into table using:
    dbms_lob.loadfromfile(variable_blob, variable_file_name, dbms_lob.getlength(variable_file_name));
    dbms_lob.fileclose(variable_file_name);
    commit.
    Regards,
    Simma........

  • How can I insert a image into a BLOB column in a table?

    I am using forms6i against a 10gR2 database and I have one table with a BLOB column and I try to insert a image into this column. I get ORA-01461 error.
    The curious case is that in another table with a BLOB column it works very fine.
    What happens with the first table? How can I avoid the error?
    Thanks in advance.

    Hi hyue,
    Thanks for visiting Apple Support Communities.
    If you would like to add an image to a project in iMovie for iOS, see this article for helpful steps:
    iMovie for iOS (iPad): Add photos to a project
    http://support.apple.com/kb/PH3171
    All the best,
    Jeremy

  • Inserting an image from an URL in a BLOB

    Hello all,
    As it's said in the title, I need a PL/SQL procedure to insert a image from web URL in a BLOB table column.
    How can I do that?
    Thanks in advance for your help.
    Max

    found this on the internet http://www.oracle-base.com/articles/misc/RetrievingHTMLandBinariesIntoTablesOverHTTP.php
    CREATE TABLE http_blob_test (
      id    NUMBER(10),
      url   VARCHAR2(255),
      data  BLOB,
      CONSTRAINT http_blob_test_pk PRIMARY KEY (id)
    CREATE SEQUENCE http_blob_test_seq;
    CREATE OR REPLACE PROCEDURE load_binary_from_url (p_url  IN  VARCHAR2) AS
      l_http_request   UTL_HTTP.req;
      l_http_response  UTL_HTTP.resp;
      l_blob           BLOB;
      l_raw            RAW(32767);
    BEGIN
      -- Initialize the BLOB.
      DBMS_LOB.createtemporary(l_blob, FALSE);
      -- Make a HTTP request and get the response.
      l_http_request  := UTL_HTTP.begin_request(p_url);
      l_http_response := UTL_HTTP.get_response(l_http_request);
      -- Copy the response into the BLOB.
      BEGIN
        LOOP
          UTL_HTTP.read_raw(l_http_response, l_raw, 32767);
          DBMS_LOB.writeappend (l_blob, UTL_RAW.length(l_raw), l_raw);
        END LOOP;
      EXCEPTION
        WHEN UTL_HTTP.end_of_body THEN
          UTL_HTTP.end_response(l_http_response);
      END;
      -- Insert the data into the table.
      INSERT INTO http_blob_test (id, url, data)
      VALUES (http_blob_test_seq.NEXTVAL, p_url, l_blob);
      -- Relase the resources associated with the temporary LOB.
      DBMS_LOB.freetemporary(l_blob);
    EXCEPTION
      WHEN OTHERS THEN
        UTL_HTTP.end_response(l_http_response);
        DBMS_LOB.freetemporary(l_blob);
        RAISE;
    END load_binary_from_url;
    EXEC load_binary_from_url('http://forums.oracle.com/forums/themes/english/resources/oralogo_small.gif');

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

  • How to insert an image file as blob using JDBC Statement

    Hi,
    I'm new on java.
    I want the code to insert an image file in Oracle database whose data type is blob.
    i want to use JDBC statement not the prepared statement.
    Please help me out.

    user8739226 wrote:
    thanks for the solution.
    I want to ask one thing
    let say i've created a method in a bean in which i'm passing three parameters.
    One is tablename as String, Second is Name of tablefields as Object, Third is Values as Object
    Like:
    public synchronized int insert(String table,Object[] fields, Object[] values)Ah now we're getting somewhere. I was trying to come up with a situation where using a regular Statement over PreparedStatement would be viable and came up with practically nothing.
    In the method body i'm accessing the table fields and values and combining them into the insert sql query.
    how can i do this using preparedstatment.
    how do i come to know here in this bean that this value is int or string or date at runtime to use setInt, setString, setdate or setBlob respectively.That's your problem. Bad design. You want to make some sort of universal insert method that can insert anything anywhere. But it doesn't really make sense, because whenever you're trying to insert something, you know exactly what you want to insert and where. You could use a PreparedStatement at that point (although encapsulate it in its own method). Now you're trying to create your own poorly designed framework over JDBC that doesn't solve problems, only increases them.
    Above was the only reason i saw, i was using statement instead of preparedstatment as statement was looking easy in this situation.
    please, give me the solution of above using preparedstatment.No, rather you should reconsider your design. What advantage does your insert() method give you over, let's say using a regular PreparedStatement. Granted, you can put your connection opening and other boilerplate code in the method. But if that's your only problem, then your insert method isn't gonna be much use. You could always switch to JPA for example and work with that.

  • Inserting Image into BLOB field from URL

    Is it possible to insert an image into a BLOB field from a URL? I don't have access to the filesystem on the server and I have a page that uses PL/PDF to generate dynamic PDF files from data I pull from the database. I would like to include my companies official header with logo on the top of the PDFs I generate and need to somehow get the image which I currently have uploaded to the images section in Application Express and can access from the "Shared Components => Images" section of the Application Builder. I just want to be able to either query whatever table holds those images or copy the image I need to a blob field in one of my tables so I can use it in my PDF document.
    The other alternative (which is what I first mentioned above) would be to try and perform an insert into the BLOB field in my table but the location of the image file would be like "http://www.myportal.com:7777/pls/htmldb/wwv_flow_file_mgr.get_file?p_security_group_id=1234567&p_flow_id=111&p_fname=myimage.jpg".
    Is this possible? If not, what can I do?
    Thanks in advance.

    The reason why I am asking this question in this forum is two-fold:
    1. I am using Application Express (AE).
    2. Since I am using AE all images that I upload to my workspace are stored in a table in a database and not as an actual file in a directory structure like in Windows etc. This being the case, I can't ever reference any of the files that I upload to my workspace in order to insert them into my BLOB field unless I know their physical location on disk (which of course does not exist b/c they are stored in the AE database somewhere). If I knew AE's database and table structure I could do a "select into ..." from whatever table stores my uploaded images and save those images to my own custom table in my BLOB field.

  • Move JPEG images inserted into d/l folder to another

    Thank goodness for time machine, I tried to make an Apple script and it went all wrong. Am restoring files (as they should be) right now...
    I would like a script attached to my downloads folder so that whenever I download a JPEG image it gets moves to another folder. I only want the script to move new additions, not existing files (like it just did) and only when new ones are introduced from a web browser lets say.
    Anybody know a script that does this? I would like to stress that the script leave other images in other nested folders alone, just the new ones introduced into the downloads folder thanks.

    For Automator, it would be as I posted earlier:
    1) *Filter Finder Items* (find files where the file extension is jpg)
    2) *Move Finder Items* (to your other folder)
    Save the workflow as a Folder Action plug-in, and attach to your download folder.
    An AppleScript can also be written that does the same thing - it would also be set up as a folder action and attached to your download folder:
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    font-weight: normal;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px;
    color: #000000;
    background-color: #FFEE80;
    overflow: auto;"
    title="this text can be pasted into the Script Editor">
    property destination : missing value -- this will be the destination folder path
    on adding folder items to this_folder after receiving these_items
    handle items added to a folder
    parameters - this_folder [alias]: the folder added to
    these_items [list]: a list if items (aliases) added
    returns nothing
    if destination is missing value then
    set destination to (choose folder with prompt "Select a destination folder:")
    end if
    tell application "Finder" to repeat with an_item in these_items
    if name extension of an_item is in {"jpg", "JPG"} then
    move an_item to destination
    end if
    end repeat
    end adding folder items to
    </pre>

  • How to insert a image file into oracle database

    hi all
    can anyone guide me how to insert a image file into oracle database now
    i have created table using
    create table imagestore(image blob);
    but when inserting i totally lost don't know what to do how to write query to insert image file

    Hi I don't have time to explain really, I did have to do this a while ago though so I will post a code snippet. This is using the commons file upload framework.
    Firstly you need a multi part form data (if you are using a web page). If you are not using a web page ignore this bit.
    out.println("<form name=\"imgFrm\" method=\"post\" enctype=\"multipart/form-data\" action=\"FileUploadServlet?thisPageAction=reloaded\" onSubmit=\"return submitForm();\"><input type=\"FILE\" name=\"imgSource\" size='60' class='smalltext' onKeyPress='return stopUserInput();' onKeyUp='stopUserInput();' onKeyDown='stopUserInput();' onMouseDown='noMouseDown(event);'>");
    out.println("   <input type='submit' name='submit' value='Submit' class='smalltext'>");
    out.println("</form>"); Import this once you have the jar file:
    import org.apache.commons.fileupload.*;Now a method I wrote to upload the file. I am not saying that this is correct, or its the best way to do this. I am just saying it works for me.
    private boolean uploadFile(HttpServletRequest request, HttpSession session) throws Exception {
            boolean result = true;
            String fileName = null;
            byte fileData[] = null;
            String fileUploadError = null;
            String imageType = "";
            String error = "";
            DiskFileUpload fb = new DiskFileUpload();
            List fileItems = fb.parseRequest(request);
            Iterator it = fileItems.iterator();
            while(it.hasNext()){
                FileItem fileItem = (FileItem)it.next();
                if (!fileItem.isFormField()) {
                    fileName = fileItem.getName();
                    fileData = fileItem.get();
                    // Get the imageType from the filename extension
                    if (fileName != null) {
                        int dotPos = fileName.indexOf('.');
                        if (dotPos >= 0 && dotPos != fileName.length()-1) {
                            imageType = fileName.substring(dotPos+1).toLowerCase();
                            if (imageType.equals("jpg")) {
                                imageType = "jpeg";
            String filePath = request.getParameter("FILE_PATH");
            session.setAttribute("filePath", filePath);
            session.setAttribute("fileData", fileData);
            session.setAttribute("fileName", fileName);
            session.setAttribute("imageType", imageType);
            return result;  
         } And now finally the method to actually write the file to the database:
    private int writeImageFile(byte[] fileData, String fileName, String imageType, String mode, Integer signatureIDIn, HttpServletRequest request) throws Exception {
            //If the previous code found a file that can be uploaded then
            //save it into the database via a pstmt
            String sql = "";
            UtilDBquery udbq = getUser(request).connectToDatabase();
            Connection con = null;
            int signatureID = 0;
            PreparedStatement pstmt = null;
            try {
                udbq.setUsePreparedStatements(true);
                con = udbq.getPooledConnection();
                con.setAutoCommit(false);
                if((!mode.equals("U")) || (mode.equals("U") && signatureIDIn == 0)) {
                    sql = "SELECT SEQ_SIGNATURE_ID.nextval FROM DUAL";
                    pstmt = con.prepareStatement(sql);
                    ResultSet rs = pstmt.executeQuery();
                    while(rs.next()) {
                       signatureID = rs.getInt(1);
                    if (fileName != null && imageType != null) {
                        sql = "INSERT INTO T_SIGNATURE (SIGNATURE_ID, SIGNATURE) values (?,?)";
                        InputStream is2 = new ByteArrayInputStream(fileData);
                        pstmt = con.prepareStatement(sql);
                        pstmt.setInt(1, signatureID);
                        pstmt.setBinaryStream(2, is2, (int)(fileData.length));
                        pstmt.executeUpdate();
                        pstmt.close();
                        con.commit();
                        con = null;
                if(mode.equals("U") && signatureIDIn != 0) {
                    signatureID = signatureIDIn.intValue();
                    if (fileName != null && imageType != null) {
                        sql = "UPDATE T_SIGNATURE SET SIGNATURE = ? WHERE SIGNATURE_ID = ?";
                        InputStream is2 = new ByteArrayInputStream(fileData);
                        pstmt = con.prepareStatement(sql);
                        pstmt.setBinaryStream(1, is2, (int)(fileData.length));
                        pstmt.setInt(2, signatureID);
                        pstmt.executeUpdate();
                        pstmt.close();
                        con.commit();
                        con = null;
            } catch (Exception e) {
                con = null;
                throw new Exception(e.toString());
            return signatureID;
       }

  • Oracle error ORA-01461when trying to insert into an ORACLE BLOB field

    I am getting Oracle error ‘ORA-01461: can bind a LONG value only  for insert into a LONG column' when trying to insert into an ORACLE BLOB field. The error occurs when trying to insert a large BLOB (JPG), but does not occur when inserting a small (<1K) picture BLOB.(JPG). Any ideas?
    BTW, when using a SQL Server datasource using the same code.... everything works with no problems.
    ORACLE version is 11.2.0.1
    The ORACLE datasource is JDBC using Oracle's JDBC driver ojdbc6.jar v11.2.0.1 (I also have tried ojdbc5.jar v11.2.0.1; ojdbc5.jar v11.2.0.4; and ojdbc6.jar v11.2.0.4 with the same error result.)
    Here is my code:
    <cfset file_mime = Lcase(Right(postedXMLRoot.objname.XmlText, 3))>
    <cfif file_mime EQ 'jpg'><cfset file_mime = 'jpeg'></cfif>
    <cfset file_mime = 'data:image/' & file_mime & ';base64,'>
    <cfset image64 = ImageReadBase64("#file_mime##postedXMLRoot.objbase64.XmlText#")>
    <cfset ramfile = "ram://" & postedXMLRoot.objname.XmlText>
    <cfimage action="write" source="#image64#" destination="#ramfile#" overwrite="true">
    <cffile action="readbinary" file="#ramfile#" variable="image_bin">
    <cffile action="delete" file="#ramfile#">
    <cfquery name="InsertImage" datasource="#datasource#">
    INSERT INTO test_images
    image_blob
    SELECT
    <cfqueryparam value="#image_bin#" cfsqltype="CF_SQL_BLOB">
    FROM          dual
    </cfquery>

    Can't you use "alter index <shema.spatial_index_name> rebuild ONLINE" ? Thanks. I could switch to "rebuild ONLINE" and see if that helps. Are there any potential adverse effects going forward, e.g. significantly longer rebuild than not using the ONLINE keyword, etc? Also wondering if spatial index operations (index type = DOMAIN) obey all the typical things you'd expect with "regular" indexes, e.g. B-TREE, etc.

  • PHP 5 Code to Upload and Retrieve an Image (aka BLOB) with Oracle

    I keep being asked about BLOBs. For posterity, here is my example updated
    to use the new PHP 5 OCI8 function names, and using bind variables for the BLOB id.
    -- cj
    <?php
    // Sample form to upload and insert an image into an ORACLE BLOB
    // column using PHP 5's OCI8 API. 
    // Note: Uses the new PHP 5 names for OCI8 functions.
    // Before running this script, execute these statements in SQL*Plus:
    //   drop table btab;
    //   create table btab (blobid number, blobdata blob);
    // This example uploads an image file and inserts it into a BLOB
    // column.  The image is retrieved back from the column and displayed.
    // Make sure there is no whitespace before "<?php" else the wrong HTTP
    // header will be sent and the image won't display properly.
    // Make sure php.ini's value for upload_max_filesize is large enough
    // for the largest lob to be uploaded.
    // Tested with Zend Core for Oracle 1.3 (i.e. PHP 5.0.5) with Oracle 10.2
    // Based on a sample originally found in
    //     http://www.php.net/manual/en/function.ocinewdescriptor.php
    $myblobid = 1;  // should really be a unique id e.g. a sequence number
    define("ORA_CON_UN", "hr");             // username
    define("ORA_CON_PW", "hr");             // password
    define("ORA_CON_DB", "//localhost/XE"); // connection string
    if (!isset($_FILES['lob_upload'])) {
    ?>
    <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST"
       enctype="multipart/form-data">
    Image filename: <input type="file" name="lob_upload">
    <input type="submit" value="Upload">
    </form>
    <?php
    else {
      $conn = oci_connect(ORA_CON_UN, ORA_CON_PW, ORA_CON_DB);
      // Delete any existing BLOB so the query at the bottom
      // displays the new data
      $query = 'DELETE FROM BTAB WHERE BLOBID = :MYBLOBID';
      $stmt = oci_parse ($conn, $query);
      oci_bind_by_name($stmt, ':MYBLOBID', $myblobid);
      $e = oci_execute($stmt, OCI_COMMIT_ON_SUCCESS);
      if (!$e) {
        die;
      oci_free_statement($stmt);
      // Insert the BLOB from PHP's tempory upload area
      $lob = oci_new_descriptor($conn, OCI_D_LOB);
      $stmt = oci_parse($conn, 'INSERT INTO BTAB (BLOBID, BLOBDATA) '
             .'VALUES(:MYBLOBID, EMPTY_BLOB()) RETURNING BLOBDATA INTO :BLOBDATA');
      oci_bind_by_name($stmt, ':MYBLOBID', $myblobid);
      oci_bind_by_name($stmt, ':BLOBDATA', $lob, -1, OCI_B_BLOB);
      oci_execute($stmt, OCI_DEFAULT);
      // The function $lob->savefile(...) reads from the uploaded file.
      // If the data was already in a PHP variable $myv, the
      // $lob->save($myv) function could be used instead.
      if ($lob->savefile($_FILES['lob_upload']['tmp_name'])) {
        oci_commit($conn);
      else {
        echo "Couldn't upload Blob\n";
      $lob->free();
      oci_free_statement($stmt);
      // Now query the uploaded BLOB and display it
      $query = 'SELECT BLOBDATA FROM BTAB WHERE BLOBID = :MYBLOBID';
      $stmt = oci_parse ($conn, $query);
      oci_bind_by_name($stmt, ':MYBLOBID', $myblobid);
      oci_execute($stmt, OCI_DEFAULT);
      $arr = oci_fetch_assoc($stmt);
      $result = $arr['BLOBDATA']->load();
      // If any text (or whitespace!) is printed before this header is sent,
      // the text won't be displayed and the image won't display properly.
      // Comment out this line to see the text and debug such a problem.
      header("Content-type: image/JPEG");
      echo $result;
      oci_free_statement($stmt);
      oci_close($conn); // log off
    ?>

    I am using oracle 10g [10.2.0.1.0] and PHP 4.3.9 with Apache.
    I tried my best to change the old functions names for example(oci_fetch)
    to the new (OCIFetch),i works every where, but i could not find the corresponded functions of (oci_fetch_assoc) that's why i can not see my BLOBS at all!
    Can some help me please, to know where are corresponded functions of oracle 8 to oracle 10g?
    Exactly here is my problem:
    $query = 'SELECT BLOBDATA FROM BTAB WHERE BLOBID = :MYBLOBID';
    $stmt = ociparse ($conn, $query);
    OCIBindByName($stmt, ':MYBLOBID', $myblobid);
    ociexecute($stmt, OCIDEFAULT);
    $arr = oci_fetch_assoc($stmt);
    // OCIFetchAssoc, OCIFetch, OCI_ASSOC ... nothing works-> Fatal error: Call to undefined function:
    $result = $arr['BLOBDATA']->load();
    What should i do?
    Thanky very much.

  • How to display image in blob field in ResultSet in SiteStudio?

    I am running Site Studio 10gR4. For a custom page, I created a component that basically runs a query. The structure of the underlying data is a combination of Varchar2, Date and a single BLOB field. The blob field either contains a simple jpeg image, or nothing.
    In my Page where I am looping through the data, how do I display the blob as an image?
    Currently the code looks like this:
         <!--$loop SQLRoutes-->
              <tr>
                   <td><!--$getValue("SQLRoutes",rsFieldByIndex("SQLRoutes", 0))--></td>
                   <td><!--$getValue("SQLRoutes",rsFieldByIndex("SQLRoutes", 1))--></td>
                   <td><!--$getValue("SQLRoutes",rsFieldByIndex("SQLRoutes", 2))--></td>
                   <td><!--$getValue("SQLRoutes",rsFieldByIndex("SQLRoutes", 3))--></td>
                   <td><!--$getValue("SQLRoutes",rsFieldByIndex("SQLRoutes", 4))--></td>
                   <td><!--$getValue("SQLRoutes",rsFieldByIndex("SQLRoutes", 5))--></td>
                   <td><!--$getValue("SQLRoutes",rsFieldByIndex("SQLRoutes", 6))--></td>
              </tr>
         <!--$endloop-->Field 1 is a blob and fields 5 and 6 are dates.
    So really two questions:
    1. How do I display field1 as an image?
    Example:
    <!--$getValue("SQLRoutes",rsFieldByIndex("SQLRoutes", 1))-->doesn't do it. Is there a different function then getValue() that I should be using to get the blob contents?
    2. I want to compare the date fields to todays date, and either change the color or conditionally display the fields. I could do this with basic taglibs from jsp. How do I do this with IDocScript?
    Example:
    <!--$if getValue("SQLRoutes",rsFieldByIndex("SQLRoutes", 6)) > dateCurrent-->
      <span class="red"><!--$getValue("SQLRoutes",rsFieldByIndex("SQLRoutes", 6))--></span>
    <!--$endif-->Thanks, Ken

    I actually don't know the answer to #1. If I were to guess, there's nothing out-of-the-box to handle blobs, so your best option is to write your own idoc function. Take a look at the How To component if you don't know how.
    For #2, you almost have it right. Insert bold:
    &lt;!--$if <b>parseDate(formatDate(</b>getValue("SQLRoutes",rsFieldByIndex("SQLRoutes", 6))<b>)) gt</b> dateCurrent<b>()</b>--&gt;
    &lt;span class="red"&gt;<!--$getValue("SQLRoutes",rsFieldByIndex("SQLRoutes", 6))-->&lt;/span&gt;
    <!--$endif-->

Maybe you are looking for

  • "Cannot connect to iTunes Store" & "iTunes store temporarily unavailable"

    PROBLEM: Our iPhones, iPad, and iPod Touches all give us "Cannot connect to iTunes Store" message when we try to purchase an App or update Apps using Apple's "App Store" App. When using iTunes on our MAC desktop, which is used to sync all our devices

  • Lightning digital av adaptor for an iPad 4

    I am considering buying a  Lightning Digital AV Adapter for my iPad 4 and a hdmi cable to connect my iPad to my television.  Will I be able to therefore watch ilovefilm instant from my iPad on my HDTV?

  • Problem in generating output in Excel

    Hi,       I have pasted this code from a blog. But i get the output in a single cell of an excel sheet. I guess its not recognising the horizontal tab and new line. Does anyone have an alternative?      <%@page language="abap" %> <%@extension name="h

  • Child cat having two parent cat

    Hi All, I would like to have dimension hierarchy in obiee. We have a table dimension having skipped hierarchy with category and subcategory. Some subcategory have two or more category as parent. category subcategory null 1 A 2 B 2 null 3 null 4 C 5 D

  • Dynamic Approval Group with Voting Method  First Responder Wins

    Hi all, i create new Approver Group with type: Dynamic, and Voting Method: First Responder Wins. and i write the query to get user_id. The query return the correct users, but in the approval list in the wf, it requires approval from all users in my d