How to store a video file in a database

Hi all,
I would like to know how can a video file be saved in Oracle Database and also the way to retreive it and display it into an OLE control. Am using Forms 6i & oracle 8i.
Tanks in Advance
Stanly Mathew

during my tries to adapt this code to my needs, following error occured during compilation of the procedure:
PLS-00201: identifier 'IMAGES.MIME_TYPE' must be declared
here is my procedure:
CREATE OR REPLACE PROCEDURE load_file( file_name VARCHAR2 )
AS file_lob BFILE;
binary_lob BLOB;
mime_type images.mime_type%TYPE;
extension_pos NUMBER;
BEGIN
--Use the extension of the file name to determing the MIME-type 
--The MIME-type for a .pdf file will be application/pdf
extension_pos := INSTR( file_name, '.' );
mime_type := 'application/' || SUBSTR( file_name,extension_pos + 1,LENGTH( file_name ) );
-- Insert a new row into the images table. Get the LOB locator
-- for the newly inserted row
-- we will be using that to insert
-- the content from the file.
INSERT INTO TESTBLOB( blobid, filename, mime_type, content )
VALUES( 1, file_name, mime_type, EMPTY_BLOB() )
RETURNING content INTO binary_lob;
-- Open up the file in the IMAGES directory named file_name,
-- load that file into the newly created LOB locator, and
-- close the file
file_lob := BFILENAME( 'TESTDIRECTORY', file_name );
dbms_lob.fileOpen ( file_lob, dbms_lob.file_readOnly );
dbms_lob.loadFromFile( binary_lob,file_lob,dbms_lob.getLength( file_lob ) );
dbms_lob.fileClose ( file_lob );
END;
how do I have to adjust the declaration of the mime_type variable respectively what does images.mime_type%TYPE mean?
katharina

Similar Messages

  • How to store streaming video file

    Hello friend
    Am streaming video file with use of VLC player,while streaming the video file i want to receive and store the video file.

    You first need to know, how VLC streams the data. If you know that, you have to write client code, which can connect to VLC and receive packets. The next step would be to analyze the packets and extract the video/ausio data from it and write it to a file. But all depends on what video format is streamed with which protocol.

  • How to store my mp3 files into my database

    Hello,
    I am having some trouble with a database i am creating to store my mp3 files. I have created the following sql statement so far using what research i did on the subject.
    CREATE TABLE music
    ( Artist CHAR(30),
    NameOfSong CHAR(30),
    Song BLOB);
    But i have no idea how to do a INSERT statement for the BLOB datatype. I am trying to use a location on my hard drive to upload the song to the table. All help is welcomed.
    Thank you,

    http://forums.oracle.com/forums/search.jspa?threadID=&q=insert+blob&objID=f75&dateRange=all&userID=&numResults=15
    Message was edited by:
    jeneesh

  • How I store my sound file in my database table

    Dear friend
    i make a table for store sound file
    table is create .
    but now
    how i insert that file which is at 'c:\my document '
    to this table.
    i try following command but it has a error
    insert into sound values('c:\my document\abc.au');
    what i do for it
    please mail me as soon as on following id
    [email protected]
    ok bye

    Dear friend
    i make a table for store sound file
    table is create .
    but now
    how i insert that file which is at 'c:\my document '
    to this table.
    i try following command but it has a error
    insert into sound values('c:\my document\abc.au');
    what i do for it
    please mail me as soon as on following id
    [email protected]
    ok bye

  • How to store Video file in Oracle9i database

    Hi
    I am working on Oracle9i Database.
    I am using Oracle9i Forms Developer for front end side.
    I want to Store a video file in a database table.
    I know that there are some data types like BLOB which support such activities but actually i dont know the exact steps of doing this task.
    Can anyone guide me in this regard that from where i have to start and how to perform this activity.
    Regards
    Ikhlaq Ahmed Khan

    Please refer to this link:
    http://www.dba-oracle.com/t_storing_insert_photo_pictures_tables.htm
    Kamran Agayev A. (10g OCP)
    http://kamranagayev.wordpress.com
    [Step by Step install Oracle on Linux and Automate the installation using Shell Script |http://kamranagayev.wordpress.com/2009/05/01/step-by-step-installing-oracle-database-10g-release-2-on-linux-centos-and-automate-the-installation-using-linux-shell-script/]

  • How can i store a video file into a ORacle Database

    I want to create a table which will store video file
    How should be the table created and how can i upload the video file to the database from my PC Say the video file is in C:\Video
    Please help me

    Take a look at the Oracle interMedia Sample Code on OTN
    http://www.oracle.com/technology/sample_code/products/intermedia/index.html

  • How to Move a Video File from Movie Section to "TV Shows" Section

    I have an Ipod classic, and am trying to figure out how to move a video file from the "Movie" section to the "Tv Shows" section. I have Itunes version 1.3 which for my device is listed as the most current version.

    haha itunes 1.3, epic.
    to clarify that, I think he would have an ipod classic 80gb which the newest version is 1.3 I think.
    However to answer your question, in itunes right click the movie, go to properties, then go to options, where it has media kind put it to tv show
    Message was edited by: Nudethecih

  • HOW CAN I TRANSFER VIDEO FILES FROM MY PC TO IPAD MINI VIA ITUNES??? WITHOUT ANY ADDITIONAL DOWNLOADABLE APP

    HOW CAN I TRANSFER VIDEO FILES FROM MY PC TO IPAD MINI USING ITUNES???  i have to google every little thing that has to do with my ipad, why cnt they make it more user friendly???? i have to dl another app just so ican transfer vid files to mu ipad mini. i already converted them to the proper format. i just cant seem to find out how to transfer with with only itunes

    im just new to itunes and ipad mini is my first apple product thats why im really having a hard time with this. i cant transfer the video file to my library... i tried dragging it to the "movies" part in my library but it still doesnt copy to the movie librarry just like how i do it with my songs.. not even the typical list appears.... all it says is movies and studd about the library and itunes, ill post a pic so u can see...

  • How can i convert video files from my mac to watch them on my iphone?, how can i convert video files to watch them on my iphone?

    how can i convert video files from my mac to watch them on my iphone?, how can i convert video files to watch them on my iphone?

    Turns out the answer to that question changes if you ask it more than 4 times, so ask it again....
    The answer depends on the type of video files you want to convert.  If they are DRM protected commercial videos, no help can be given here.  Google.

  • How do i move video files from PC to iCloud?

    how do i move video files from PC to iCloud?

    You can't move videos to iCloud, but you can upload photos

  • How to store the flat file data into custom table?

    Hi,
    Iam working on inbound interface.Can any one tell me how to store the flat file data into custom table?what is the procedure?
    Regards,
    Sujan

    Hie
    u can use function
    F4_FILENAME
    to pick the file from front-end or location.
    then use function
    WS_UPLOAD
    to upload into
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      CALL FUNCTION 'F4_FILENAME'   "Function to pick file
        EXPORTING
          field_name = 'p_file'     "file
        IMPORTING
          file_name  = p_file.     "file
      CALL FUNCTION 'WS_UPLOAD'
       EXPORTING
         filename                       = p_file1
        TABLES
          data_tab                      = it_line
    *then loop at it_line splitting it into the fields of your custom table.
    loop at it_line.
              split itline at ',' into
              itab-name
              itab-surname.
    endloop.
    then u can insert the values into yo table from the itab work area.
    regards
    Isaac Prince

  • How to store an Excel file in InfoPath for users to edit

    Hello,
    I need an example on how to store an Excel file within InfoPath 2010 so that every time a user opens the InfoPath form they can make changes and can save as part of the form. The next user opens the form and another Excel files (blank) where they make changes and
    saves. Thanks

    Streamlining this would require a bit of custom work I imagine. However if you don't mind giving the users some extra clicks, there are probably a few ways to get the job done.
    You could upload the excel file to SharePoint, make sure it's read-only and link to it within the InfoPath form. Then the process would be that users open the InfoPath form, fill it out, download the excel doc to their desktops and fill it out, and then
    attach it to the IP form.
    Or you could set up a separate, sister library where the New Item defaults to your Excel template. Then from within the InfoPath form you could have a hyperlink that creates the new item, saving it to the library. The caveat here is finding a way to link
    to the two items together with a unique identifier. The benefit though is being able to browse and interact with Excel docs independent of the forms they are attached to, if necessary.

  • How to store the zip file in oracle table?

    hi,
    How to store the zip file in oracle table ?
    is it possible to unzip and read the file ?
    Thanks
    Rangan S

    SQL> DESC BLOB_TABLE;
    Name Type Nullable Default Comments
    A INTEGER Y
    B BLOB Y
    SQL> INSERT INTO BLOB_TABLE VALUES(5,BLOB('MWDIR_TST','TEST.ZIP'));
    INSERT INTO BLOB_TABLE VALUES(5,BLOB('MWDIR_TST','TEST.ZIP'))
    ORA-00904: "BLOB": invalid identifier
    SQL> INSERT INTO BLOB_TABLE VALUES(5,('MWDIR_TST','TEST.ZIP'));
    INSERT INTO BLOB_TABLE VALUES(5,('MWDIR_TST','TEST.ZIP'))
    ORA-00907: missing right parenthesis
    SQL> INSERT INTO BLOB_TABLE VALUES(5,('\\MWDIR_TST\TEST.ZIP'));
    INSERT INTO BLOB_TABLE VALUES(5,('\\MWDIR_TST\TEST.ZIP'))
    ORA-01465: invalid hex number
    SQL> INSERT INTO BLOB_TABLE VALUES(5,('\\MWDIR_TST\TEST.ZIP'));

  • Multiple MailAttachment  to File   -   How to store as multiple files ?

    Hi Friends ,
                      Can you please tell me  How to Store as Multiple files which i read as attachements  from Mail Sender Adapter .
                         In My scenario i can able to bring the Multiple attachement in the Paylod using PaylodSwapBean .<b> I wan to store these attachements to a file system.</b>   ie. Whatever attachements i am reading i have to store in a file .             
               For eg., In my scenario i have designed the Data Type as DT_Test--> Row --- > Details .
                     Details can able to hold each line of Each File . One file contains multiple Line data .
                   <b>  If i use Message Transform Bean</b> , first attachement only getting Tranformed rest of them as it is . Not getting tranformed to required format.
                     Please give some suggestions !
    Regards .,
    V.Rangarajan

    Oops didn't observe abt the message transform bean usage... .....
    check with these
    3.2.3 Changing the Name and Type of the Payload................................. 6
    3.2.4 Sending a Mail with Attachment ...................................................... 7
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/9e6c7911-0d01-0010-1aa3-8e1bb1551f05
    SAP Note 793922
    http://help.sap.com/saphelp_nw04s/helpdata/en/2e/bf37423cf7ab04e10000000a1550b0/frameset.htm
    <b>Cheers,
    *RAJ*<b>

  • How to store character in file and display result on front panel

    hi
    currently i m working on FPGA project.i want to aquired data from FPGA board.i want to know about how to store character to file and contineous display each character on front panel in string format.
    i have complete up to character display on front panel but only single character display when i want all character in string format.
    Solved!
    Go to Solution.

    I don't see how this question is at all related to Digital I/O but it sounds like you just need a shift register with the concantanate string function.

Maybe you are looking for

  • How much RAM can I install?

    Alright.  This seems simple but I don't want to have to go through the rigamarole of buying the wrong one and having to return it.  I have a Mid-2010 MacBook Pro running Lion 10.7.3, currently with the 4gb of RAM that it came with.  I want to upgrade

  • My custom ringtones on iOS8 did not transfer

    My custom ringtones did not transfer to my new iPhone6.  What happen and how do I recover them.  I noticed the iOS8.0.2 update stated something about Ringtones.  I also don't see them in my iTunes but still have them in my previous iPhone5S.  How do

  • Lightroom raw processing error - ORF file format

    I am trying to get Lightroom to import files from my Olympus E510. It creates files in raw (.orf) format. The Olympus tool supplied with the camera works fine and reads all of the files. Lightroom says ALL of the files are corrupt. I'd really like to

  • Can I creat 2 separate contact lists on the IPad?

    I souls like to creat two icons for separate contact lists. Is it possible on the iPad?

  • I cannot locate the TDK For Life on Record FM Radio   Alarm Clock app?

    I cannot locate the App for TDK For Life on Record FM Radio   Alarm Clock app? It is not available in the Irish Apple stope nor the USA Apple store.