Saving documents in the Database

Does anybody know if it is possible to drag and drop a document into a Form and then save it to the database?
If you do then can you tell me how?
Thanks
Trudy

To insert a Date into a database the best way is to use
the java.sql.Date object instead of the java.util.Date
int year = 2002;
int month = 2;
int day = 3;
java.util.Date sdate = new java.util.Date(year, month, day);
java.sql.Date sqldate = new java.sql.Date(sdate.getTime());
Write the sqldate variable into the database.

Similar Messages

  • I cannot open Pages from the app or from a saved document on the desk top.  I get an error: "The application Pages cannot be opened  -1712"  Any suggestions?

    I cannot open Pages from the app or from a saved document on the desk top.  I get an error: "The application Pages cannot be opened  -1712"  Any suggestions?

    The following previous discussion has a solution that worked for a variety of people with the -1712 error on a variety of applications and may help: The application Safari can't be opened -1712

  • Error message: "Querying or saving changes to the database failed."

    Hi all,
    I can sense I'm becoming a regular on this particular forum - the problem of spending 8 hours a day trying to get this software working!
    _*The problem*_
    When i try and setup a new device, or modify an existing one, I get an error message when i get to the Transcode Settings page. The error message is "Querying or saving changes to the database failed." After this I get a blank screen and can no longer see my settings.
    No amount of restarting has fixed this. And I cannot see a way to create a device through the client software and add transcode settings.
    Help?
    Thanks in advance,
    Ben

    Ah very good!
    Ok - it seems then that this works absolutely fine as a work around. I can create a device and then assign the device to transcode settings through the client adminsitration panel (which is indeed what I meant).
    So, there is a work around. Far less pressing now, but I would like to know why I'm getting the error message all the same - I'm now concerned about the integrity of the database...
    Thanks Tony!
    B

  • Saving a WORD or PDF document in the database?

    Hello,
    If I have a WORD document, PDF document or EXCEL document. How can I save them in the database? What type of LOB I should use.
    What I would like to do is have a webpage with a text box and a browse button. The user can then use the browse buttton to find the file and have its location inserted into the text box. Then the user can click another button to add the file to the database.
    Once the file is in the database - I also want to have an update page where the user can change the files saved in the database or delete them also
    Thanks
    Doug

    Well, Word and Excel documents are binary, so you will need a Binary LOB (BLOB).
    I have recently been storing/retrieving BLOBs through ASP/ADO . . .
    BLOBs are limited to 4GB, but ADO has a limit of 2GB. Hopefully, that will not be a problem.
    If you are using ODBC, then be aware that you need to enable LOBs by setting LOB=T in the connection string. If you are using ODBC with stored procedures, then there is a bug that causes the LOBs to be truncated to 32K, which is fixed in 9.2.0.6.5. A colleague tells me that the Microsoft ODBC Driver for Oracle works with LONGs but not with LOBs.
    If you are using OleDB with stored procedures, then you'll need to set the "SPPrmsLOB" property to TRUE.
    When uploading BLOBs through ADO, you need to set the parameter size to 1 higher than the actual size, otherwise you get an error.
    When retrieving the BLOBs through stored procedures as OUT parameters, you need to set the parameter size to larger than the BLOB, otherwise it gets truncated. I do not like having to specify 2GB for a file that might only be 32K, so I prefer to return a record set via a REF CURSOR.
    Tak

  • Input the data in to the grid without saving it to the  database

    <PRE lang=jsp id=pre2 style="MARGIN-TOP: 0px" nd="109"><%@ taglib uri="/WEB-INF/tags/datagrid.tld" prefix="grd" %>
    <%@ page import="java.sql.Connection" %>
    <%@ page import="java.sql.DriverManager" %>
    <%@ page import="java.sql.SQLException" %>
    <%@ page import="com.freeware.gridtag.*" %>
    <%
    int intCurr = 1;
    int intSortOrd = 0;
    String strTmp = null;
    String strSQL = null;
    String strSortCol = null;
    String strSortOrd = "ASC";
    boolean blnSortAsc = true;
    strSQL = "SELECT CLICORPORATION, CLICLIENT, CLIDESCRIPTION, " +
    "CLIENABLED, CLIUPDSTAMP FROM CLIENTMASTER ";
    Connection objCnn = null;
    Class objDrvCls = null;
    objDrvCls = Class.forName("oracle.jdbc.driver.OracleDriver");
    objCnn = DriverManager.getConnection("<A class=iAs style="FONT-WEIGHT: normal; FONT-SIZE: 100%; PADDING-BOTTOM: 1px; COLOR: darkgreen; BORDER-BOTTOM: darkgreen 0.07em solid; BACKGROUND-COLOR: transparent; TEXT-DECORATION: underline" href="#" target=_blank itxtdid="3346226">jdbc</A>:oracle:thin:@Host:port:sid",
    "cashincpri", "cashincpri");
    if (objDrvCls != null) objDrvCls = null;
    strTmp = request.getParameter("txtCurr");
    try
    if (strTmp != null)
    intCurr = Integer.parseInt(strTmp);
    catch (NumberFormatException NFEx)
    strSortCol = request.getParameter("txtSortCol");
    strSortOrd = request.getParameter("txtSortAsc");
    if (strSortCol == null) strSortCol = "CLICLIENT";
    if (strSortOrd == null) strSortOrd = "ASC";
    blnSortAsc = (strSortOrd.equals("ASC"));
    %>
    <html>
    <head>
    <title>Grid Tag Demonstration</title>
    <link REL="StyleSheet" HREF="css/GridStyle.css">
    <script LANGUAGE="javascript">
    function doNavigate(pstrWhere, pintTot)
    var strTmp;
    var intPg;
    strTmp = document.frmMain.txtCurr.value;
    intPg = parseInt(strTmp);
    if (isNaN(intPg)) intPg = 1;
    if ((pstrWhere == 'F' || pstrWhere == 'P') && intPg == 1)
    alert("You are already viewing first page!");
    return;
    else if ((pstrWhere == 'N' || pstrWhere == 'L') && intPg == pintTot)
    alert("You are already viewing last page!");
    return;
    if (pstrWhere == 'F')
    intPg = 1;
    else if (pstrWhere == 'P')
    intPg = intPg - 1;
    else if (pstrWhere == 'N')
    intPg = intPg + 1;
    else if (pstrWhere == 'L')
    intPg = pintTot;
    if (intPg < 1) intPg = 1;
    if (intPg > pintTot) intPg = pintTot;
    document.frmMain.txtCurr.value = intPg;
    document.frmMain.submit();
    function doSort(pstrFld, pstrOrd)
    document.frmMain.txtSortCol.value = pstrFld;
    document.frmMain.txtSortAsc.value = pstrOrd;
    document.frmMain.submit();
    </script>
    </head>
    <body>
    <h2>Grid Example</h2>
    <form NAME="frmMain" METHOD="post">
    <grd:dbgrid id="tblStat" name="tblStat" width="100" pageSize="10"
    currentPage="<%=intCurr%>" border="0" cellSpacing="1" cellPadding="2"
    dataMember="<%=strSQL%>" dataSource="<%=objCnn%>" cssClass="gridTable">
    <grd:gridpager imgFirst="images/First.gif" imgPrevious="images/Previous.gif"
    imgNext="images/Next.gif" imgLast="images/Last.gif"/>
    <grd:gridsorter sortColumn="<%=strSortCol%>" sortAscending="<%=blnSortAsc%>"/>
    <grd:rownumcolumn headerText="#" width="5" HAlign="right"/>
    <grd:imagecolumn headerText="" width="5" HAlign="center"
    imageSrc="images/Edit.gif"
    linkUrl="javascript:doEdit('{CLICORPORATION}', '{CLICLIENT}')"
    imageBorder="0" imageWidth="16" imageHeight="16"
    alterText="Click to edit"/>
    <grd:textcolumn dataField="CLICLIENT" headerText="Client"
    width="10" sortable="true"/>
    <grd:textcolumn dataField="CLIDESCRIPTION" headerText="Description"
    width="50" sortable="true"/>
    <grd:decodecolumn dataField="CLIENABLED" headerText="Enabled" width="10"
    decodeValues="Y,N" displayValues="Yes,No" valueSeperator=","/>
    <grd:datecolumn dataField="CLIUPDSTAMP" headerText="Last Updated"
    dataFormat="dd/MM/yyyy HH:mm:ss" width="20"/>
    </grd:dbgrid>
    <input TYPE="hidden" NAME="txtCurr" VALUE="<%=intCurr%>">
    <input TYPE="hidden" NAME="txtSortCol" VALUE="<%=strSortCol%>">
    <input TYPE="hidden" NAME="txtSortAsc" VALUE="<%=strSortOrd%>">
    </form>
    </body>
    </html>
    <%
    try
    if (objCnn != null)
    objCnn.close();
    catch (SQLException SQLExIgnore)
    if (objCnn != null) objCnn = null;
    %>
    </PRE>
    by using this code we will get the gide.
    but the problem is when we are inserting the new record after click to save the record first saves the data in the Db and then it appears on the grid.
    Is it possible to do reverse of the above :
    first it comes to the grid and then after click to save it save to the database.
    please help me
    Regards,
    imran

    Hi Yamini,
    What do you mean by without query region here? Do you wish to implement the complete search/result functionality without using the Query page? Or your question already answered. Kindly confirm.
    Regards
    Sumit

  • Store documents in the database

    I have a table called doc_detail with the following details
    create table doc_detail
    document_id number primary key, -- system generated key
    document_type varchar2(10) not null, -- doc,pdf,xls
    document_content blob not null
    lob(document_content) store as securefile slob
    tablespace test_data;
    Sample Data:
    1 doc test.doc
    2 pdf test.pdf
    DB version :Oracle 11g Release 1
    My queries are
    1. How to load the above doc,pdf files into the oracle database without using sql loader?
    2. What is the best way to do capacity planning for these documents. Let's say the average size of each file is 50k max.
    3. How to download the data from the table with proper format? I heard that we can not download the documents from database without java interface. Is that true?
    4. Are there significant overhead in storing the file in the database?
    Could you please shed me some lights on this? It would be great if you give an example, if possible.

    While you are waiting for an answer, you might want to look at Oracle's related documentation
    http://www.oracle.com/pls/db112/portal.portal_db?selected=7&frame=#oracle_multimedia
    and specifically at the SecureFiles and Large Objects Developer's Guide and "Oracle Multimedia" group.
    And http://apex.oracle.com/pls/apex/f?p=44785:1 should lead you to tutorials provided by Oracle.

  • Downloading and saving documents using the latest version of Firefox is problematic.

    I am having bad experiences in downloading documents using the latest version of Firefox. When one downloads one is offered the option of opening or saving the document. When you select save it does not give you the option of saving it to a folder on your hard drive. You need to open it anyway in order to save it to a desired location. If you simply hit save its only saved to a temporary or downloads folder - and these can never be found again once you close the doc. Last night I lost many hours of work on a document in this way. It would be great if this could be sorted because I enjoy using Firefox. But I have now lost several documents inadvertantly and there is extra work in saving items - which is beginning to be quite a drag. Kind regards, Howard Varney. .

    You are indeed up to date. Firefox stopped using that address as its default start page when 4.0 came out - the page you're using may be (wrongly) assuming that if you're looking at it, you must still be on Firefox 3.6.
    If you [[How to set the home page#w_restore-the-default-home-page|restore the default home page]] you should get more up-to-date information.

  • Saving forms in the database

    Is it possible to save an Oracle Form in the database? I have some forms thah require checking to see if they access various tables. I'd like to load the forms into the database and query the forms metadata, but not being a forms person I'm not sure if this is possible.
    Any information would be helpful.
    Many Thanks
    Paddy

    Version? (http://blogs.oracle.com/shay/2007/03/02)
    This is an article from Metalink:
    Subject: Oracle Forms in Applications FAQ
    Doc ID: Note:177610.1 Type: FAQ
    Last Revision Date: 28-FEB-2006 Status: PUBLISHED
    Can you save Form modules (FMB, MMB, PLL) into the database?
    Yes and no. Yes if its standalone and no if its part of Apps, this is because Apps forms are structured so that their dependent modules are all stored as files. In Forms 9i (not yet released) you will not be able to store Forms modules in the database altogether.

  • Saving dates in the database

    How do I save a date in the database?
    My code is as follows:
    int year = 2002;
    int month = 2;
    int day = 3;
    java.util.Date sdate = new java.util.Date(year, month, day);
    PreparedStatement ps = "INSERT INTO period_table(pe_start) VALUES (?)";
    ps.setDate(1, sdate);
    ps.executeUpdate();

    To insert a Date into a database the best way is to use
    the java.sql.Date object instead of the java.util.Date
    int year = 2002;
    int month = 2;
    int day = 3;
    java.util.Date sdate = new java.util.Date(year, month, day);
    java.sql.Date sqldate = new java.sql.Date(sdate.getTime());
    Write the sqldate variable into the database.

  • WEBUTIL_PG.WRITE_DATA( ) and uploading documents into the database

    When we run our Forms application through Forms Builder, with the user account utilized by our actual users, we're able to upload a file into the database using webutil. This particular database user account is restricted to only the tables and packages it needs access to, granting the full SELECT, INSERT, UPDATE, DELETE to the tables, and then EXECUTE on the packages.
    However, when our Developers use their personal database accounts, which essentially have SELECT ANY .. EXECUTE ANY ... etc, this upload process is halted within webutil.pll when it calls the database PACKAGE procedure WEBUTIL_PG.WRITE_DATA( ). It just hangs on that step.
    When you look in OEM, during that hang the graph is showing high levels of "Network" activity. Just a solid plateau. We can't figure out why the difference between these accounts has an effect. Does someone see a pattern here that we're missing?
    Thanks,
    --=Chuck

    "Still sounds like a permissions issue to me." I know right?
    So I logged in as myself. I have DBA privileges in the database. The call to the database package hung for me as well. No error ... just a hung cursor.
    As for debugging ... the call to WEBUTIL_PG hangs, when the Forms code gets to that point in the webutil.pll. So we never even get to the database.
    Our next step, is to try to recreate the process solely in PL/SQL without webutil.pll, but the code in there is pretty extensive, and teasing out only the pieces we'll need is pretty tricky.

  • Saving sessions in the database...

    Hi there, I'm trying to save a session object ( not a J2EE session but a custom one ) in an Oracle database. I save the session in a table with a BLOB column and some other varchar columns... Whenever I want to write a blob, the application freezes... When I want to read a file, it's ok... Anyone knows of this problem? Here is the code of my write method:
      private void writeSession(CapSession pSession) throws Exception
        static final String writeObjSQL      = "BEGIN " +
                                             "  INSERT INTO intranet_sessions(session_id, session_last_access, session_timeout, session_value) " +
                                             "  VALUES (?, ?, ?, empty_blob()) " +
                                             "  RETURN session_value INTO ?; " +
                                             "END;";
        CallableStatement stmt = conn.prepareCall(writeObjSQL);
        stmt.setString(1, pSession.getSessionId() + pSession.getPassword());
        stmt.setLong(2, pSession.getLastAccess());
        stmt.setLong(3, pSession.getTimeout());
        stmt.registerOutParameter(4, java.sql.Types.BLOB);
        stmt.executeUpdate();
        BLOB blob = (BLOB) stmt.getBlob(4);
        OutputStream os = blob.getBinaryOutputStream();
        ObjectOutputStream oop = new ObjectOutputStream(os);
        oop.writeObject(pSession);
        oop.flush();
        oop.close();
        os.close();
        stmt.close();
        conn.commit();
    }Thanks!

    Try this
    conn.setAutoCommit(false);
    PreparedStatement pstmtIns = conn.prepareStatement
                   ("INSERT INTO intranet_sessions" +
                        "(session_id, session_last_access, session_timeout, session_value) " +
    " VALUES (?, ?, ?, empty_blob()) ");
    pstmt.setString(1, pSession.getSessionId() + pSession.getPassword());
    pstmt.setLong(2, pSession.getLastAccess());
    pstmt.setLong(3, pSession.getTimeout());
    pstmt.execute();
    PreparedStatement pstmtSel = conn.prepareStatement
                   ("select session_value from intranet_sessions where session_id = ? for update");
    pstmtSel.setString(1, pSession.getSessionId() + pSession.getPassword());
    ResultSet rs = pstmtSel.executeQuery();
    while(rs.next())
         BLOB blob = (BLOB) rs.getBlob(1);
         OutputStream os = blob.getBinaryOutputStream();
         ObjectOutputStream oop = new ObjectOutputStream(os);
         ObjectOutputStream oop = new ObjectOutputStream(os);
         oop.writeObject(pSession);
    oop.flush();
    }

  • Saving documents on the external hard drive that already contains documents

    I have just purchased a new iMac and I want to save documents on an existing external hard drive I have.  When I try to save the document is says Macintosh HD read only.  And when I try to print documents that are already in the hard drive it says Secured documents. Help!

    You can use one of those software, or put your Mac in virtualized Windows mode to write to it, or put the hard drive back in a PC and network to the PC.
    Virtualization tools are shown here:
    https://discussions.apple.com/docs/DOC-2741

  • Capture Web Cam image in APEX and Upload into the Database

    Overview
    By using a flash object, you should be able to interface with a usb web cam connected to the client machine. Their are a couple of open source ones that I know about, but the one I chose to go with is by Taboca Labs and is called CamCanvas. This is released under the MIT license, and it is at version 0.2, so not very mature - but in saying that it seems to do the trick. The next part is to upload a snapshot into the database - in this particular implementation, it is achieved by taking a snapshot, and putting that data into the canvas object. This is a new HTML5 element, so I am not certain what the IE support would be like. Once you have the image into the canvas, you can then use the provided function convertToDataURL() to convert the image into a Base64 encoded string, which you can then use to convert into to a BLOB. There is however one problem with the Base64 string - APEX has a limitation of 32k for and item value, so can't be submitted by normal means, and a workaround (AJAX) has to be implemented.
    Part 1. Capturing the Image from the Flash Object into the Canvas element
    Set up the Page
    Required Files
    Download the tarball of the webcam library from: https://github.com/taboca/CamCanvas-API-/tarball/master
    Upload the necessary components to your application. (The flash swf file can be got from one of the samples in the Samples folder. In the root of the tarball, there is actually a swf file, but this seems to be a different file than of what is in the samples - so I just stick with the one from the samples)
    Page Body
    Create a HTML region, and add the following:
        <div class="container">
           <object  id="iembedflash" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
    codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="320" height="240">
                <param name="movie" value="#APP_IMAGES#camcanvas.swf" />
                <param name="quality" value="high" />
              <param name="allowScriptAccess" value="always" />
                <embed  allowScriptAccess="always"  id="embedflash" src="#APP_IMAGES#camcanvas.swf" quality="high" width="320" height="240"
    type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" mayscript="true"  />
        </object>
        </div>
    <p><a href="javascript:captureToCanvas()">Capture</a></p>
    <canvas style="border:1px solid yellow"  id="canvas" width="320" height="240"></canvas>That will create the webcam container, and an empty canvas element for the captured image to go into.
    Also, have a hidden unprotected page item to store the Base64 code into - I called mine P2_IMAGE_BASE64
    HTML Header and Body Attribute
    Add the Page HTML Body Attribute as:
    onload="init(320,240)"
    JavaScript
    Add the following in the Function and Global Variable Declarations for the page (mostly taken out of the samples provided)
    //Camera relations functions
    var gCtx = null;
    var gCanvas = null;
    var imageData = null;
    var ii=0;
    var jj=0;
    var c=0;
    function init(ww,hh){
         gCanvas = document.getElementById("canvas");
         var w = ww;
         var h = hh;
         gCanvas.style.width = w + "px";
         gCanvas.style.height = h + "px";
         gCanvas.width = w;
         gCanvas.height = h;
         gCtx = gCanvas.getContext("2d");
         gCtx.clearRect(0, 0, w, h);
         imageData = gCtx.getImageData( 0,0,320,240);
    function passLine(stringPixels) {
         //a = (intVal >> 24) & 0xff;
         var coll = stringPixels.split("-");
         for(var i=0;i<320;i++) {
              var intVal = parseInt(coll);
              r = (intVal >> 16) & 0xff;
              g = (intVal >> 8) & 0xff;
              b = (intVal ) & 0xff;
              imageData.data[c+0]=r;
              imageData.data[c+1]=g;
              imageData.data[c+2]=b;
              imageData.data[c+3]=255;
              c+=4;
         if(c>=320*240*4) {
              c=0;
              gCtx.putImageData(imageData, 0,0);
    function captureToCanvas() {
         flash = document.getElementById("embedflash");
         flash.ccCapture();
         var canvEle = document.getElementById('canvas');
         $s('P2_IMAGE_BASE64', canvEle.toDataURL());//Assumes hidden item name is P2_IMAGE_BASE64
         clob_Submit();//this is a part of part (AJAX submit value to a collection) two
    }In the footer region of the page (which is just a loading image to show whilst the data is being submitted to the collection [hidden by default]) :<img src="#IMAGE_PREFIX#processing3.gif" id="AjaxLoading"
    style="display:none;position:absolute;left:45%;top:45%;padding:10px;border:2px solid black;background:#FFF;" />If you give it a quick test, you should be able to see the webcam feed and capture it into the canvas element by clicking the capture link, in between the two elements - it might through a JS error since the clob_Submit() function does not exist yet.
    *Part 2. Upload the image into the Database*
    As mentioned in the overview, the main limitation is that APEX can't submit values larger than 32k, which I hope the APEX development team will be fixing this limitation in a future release, the workaround isn't really good from a maintainability perspective.
    In the sample applications, there is one that demonstrates saving values to the database that are over 32k, which uses an AJAX technique: see http://www.oracle.com/technetwork/developer-tools/apex/application-express/packaged-apps-090453.html#LARGE.
    *Required Files*
    From the sample application, there is a script you need to upload, and reference in your page. So you can either install the sample application I linked to, or grab the script from the demonstration I have provided - its called apex_save_large.js.
    *Create a New Page*
    Create a page to Post the large value to (I created mine as 1000), and create the following process, with the condition that Request = SAVE. (All this is in the sample application for saving large values).declare
         l_code clob := empty_clob;
    begin
         dbms_lob.createtemporary( l_code, false, dbms_lob.SESSION );
         for i in 1..wwv_flow.g_f01.count loop
              dbms_lob.writeappend(l_code,length(wwv_flow.g_f01(i)),wwv_flow.g_f01(i));
         end loop;
         apex_collection.create_or_truncate_collection(p_collection_name => wc_pkg_globals.g_base64_collection);
         apex_collection.add_member(p_collection_name => wc_pkg_globals.g_base64_collection,p_clob001 => l_code);
         htmldb_application.g_unrecoverable_error := TRUE;
    end;I also created a package for storing the collection name, which is referred to in the process, for the collection name:create or replace
    package
    wc_pkg_globals
    as
    g_base64_collection constant varchar2(40) := 'BASE64_IMAGE';
    end wc_pkg_globals;That is all that needs to be done for page 1000. You don't use this for anything else, *so go back to edit the camera page*.
    *Modify the Function and Global Variable Declarations* (to be able to submit large values.)
    The below again assumes the item that you want to submit has an item name of 'P2_IMAGE_BASE64', the condition of the process on the POST page is request = SAVE, and the post page is page 1000. This has been taken srtaight from the sample application for saving large values.//32K Limit workaround functions
    function clob_Submit(){
              $x_Show('AjaxLoading')
              $a_PostClob('P2_IMAGE_BASE64','SAVE','1000',clob_SubmitReturn);
    function clob_SubmitReturn(){
              if(p.readyState == 4){
                             $x_Hide('AjaxLoading');
                             $x('P2_IMAGE_BASE64').value = '';
              }else{return false;}
    function doSubmit(r){
    $x('P2_IMAGE_BASE64').value = ''
         flowSelectAll();
         document.wwv_flow.p_request.value = r;
         document.wwv_flow.submit();
    }Also, reference the script that the above code makes use of, in the page header<script type="text/javascript" src="#WORKSPACE_IMAGES#apex_save_large.js"></script>Assuming the script is located in workspace images, and not associated to a specific app. Other wise reference #APP_IMAGES#
    *Set up the table to store the images*CREATE TABLE "WC_SNAPSHOT"
    "WC_SNAPSHOT_ID" NUMBER NOT NULL ENABLE,
    "BINARY" BLOB,
    CONSTRAINT "WC_SNAPSHOT_PK" PRIMARY KEY ("WC_SNAPSHOT_ID")
    create sequence seq_wc_snapshot start with 1 increment by 1;
    CREATE OR REPLACE TRIGGER "BI_WC_SNAPSHOT" BEFORE
    INSERT ON WC_SNAPSHOT FOR EACH ROW BEGIN
    SELECT seq_wc_snapshot.nextval INTO :NEW.wc_snapshot_id FROM dual;
    END;
    Then finally, create a page process to save the image:declare
    v_image_input CLOB;
    v_image_output BLOB;
    v_buffer NUMBER := 64;
    v_start_index NUMBER := 1;
    v_raw_temp raw(64);
    begin
    --discard the bit of the string we dont need
    select substr(clob001, instr(clob001, ',')+1, length(clob001)) into v_image_input
    from apex_collections
    where collection_name = wc_pkg_globals.g_base64_collection;
    dbms_lob.createtemporary(v_image_output, true);
    for i in 1..ceil(dbms_lob.getlength(v_image_input)/v_buffer) loop
    v_raw_temp := utl_encode.base64_decode(utl_raw.cast_to_raw(dbms_lob.substr(v_image_input, v_buffer, v_start_index)));
    dbms_lob.writeappend(v_image_output, utl_raw.length(v_raw_temp),v_raw_temp);
    v_start_index := v_start_index + v_buffer;
    end loop;
    insert into WC_SNAPSHOT (binary) values (v_image_output); commit;
    end;Create a save button - add some sort of validation to make sure the hidden item has a value (i.e. image has been captured). Make the above conditional for request = button name so it only runs when you click Save (you probably want to disable this button until the data has been completely submitted to the collection - I haven't done this in the demonstration).
    Voila, you should have now be able to capture the image from a webcam. Take a look at the samples from the CamCanvas API for extra effects if you wanted to do something special.
    And of course, all the above assumed you want a resolution of 320 x 240 for the image.
    Disclaimer: At time of writing, this worked with a logitech something or rather webcam, and is completely untested on IE.
    Check out a demo: http://apex.oracle.com/pls/apex/f?p=trents_demos:webcam_i (my image is a bit blocky, but i think its just my webcam. I've seen others that are much more crisp using this) Also, just be sure to wait for the progress bar to dissappear before clicking Save.
    Feedback welcomed.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Hmm, maybe for some reason you aren't getting the base64 version of the saved image? Is the collection getting the full base64 string? Seems like its not getting any if its no data found.
    The javascript console is your friend.
    Also, in the example i used an extra page, from what one of the examples on apex packages apps had. But since then, I found this post by Carl: http://carlback.blogspot.com/2008/04/new-stuff-4-over-head-with-clob.html - I would use this technique for submitting the clob, over what I have done - as its less hacky. Just sayin.

  • Data type for Saving Image in SQL database

    Hi,
        Which is the best way for saving images in the database? Filestream or Varbinary(max)?. Will the Varbinary max comsume much space or it will only take the actual size of the data?

    I've used FILETABLE for storing images in SQL 2012
    You can configure it to have transact and non transact access if you want
    see
    http://visakhm.blogspot.in/2012/07/working-with-filetables-in-sql-2012.html
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Error occurred while saving document in Web Analysis Studio

    We have encountered an issue when we tried to save a new report in Web Analysis. An error message box will prompt up displaying "Error occurred while saving document." (Please refer to the attached screenshots). Clicking the details button gives no response.
    Originally we encountered this whilst creating a report with an SQL spreadsheet (JDBC connection tested successfully), which failed to save. Proceeding to test this saving a blank report also gave the same error message.
    The report shows up in the Oracle view, however also produces an error when trying to open it. "Unable to perform request
    Undefined exception encountered. Recommended Action: Contact your corporate technical support." (Please refer to the attached screenshots)
    Web Analysis version 11.1.2.3.000.1175
    Please advise on how to handle this case

    Hi Soumya,
    Thanks for your reply. I am already using the admin account which is given administrator provisioning under Reporting & Analysis. I have not had issues in the past of saving documents to the server location (e.g. with FR studio). Any ideas as to what else could cause this error? Thanks!

Maybe you are looking for

  • Laptop error message need help

    the instruction at 0x606f031e referenced memory at 0x606f031e. the required data was not placed into memory because of an I/O error status of 0xc000009c that is the message i am getting it is an older laptop with windows pro i cant access the admin o

  • Macbook Pro Thunderbolt and HDMI displays switch on wake up

    Hi there, Currently using a late 2013 15" Macbook Pro., latest version of Mavericks. I have one display hooked up through Thunderbolt->DVI, with a second set up through HDMI->DVI. There seems to be an issue where on waking the monitors up from sleep

  • IPad not reliable for placing online orders?

    I logged on to Barnes and Noble to place an order using iPad (4.2.1) via Safari (5.0.3) and 3G (no wifi, no printer available); I used a gift card and paid through PayPal. The order, by all evidence, appeared to go through; BN displayed the completed

  • Hungary VAT report in HUF - company code currency is EUR

    Hi, We have the below requirement from our client. Company is incorporated in Switzerland and is having a plant in Hungary. We have decided to have 2 company codes one with country key as CH(switzerland) and the other with country key as HU (Hungary)

  • My head phone is nt working

    my head phone is nt working it does'nt show earpiece sign wen i shuffle ringer volume please help me out