BLOB or FILE CONNECTION

My requirement of applications is to store the deal huge amount of video and audio, I see two ways to do this is by storing the file on BB using the connection of gall and other storage BLOB in the sqlite database.

I'm not able to Fig that is the best of this. I'm working on that for the first time.

any help is welcome!

Kind regards

A Y

Hi avi_yach,

There is no simple answer to this.

Here are a few comments that might give you a little push in the right direction:

1. the file system approach is simpler and therefore easier to develop and debug (and of course, to shorten the time to start).

2. the approach of the database is better organized. You keep each file with its metadata, and everything is kept in one place.

3 if I remember, FileConnection is limited to 5 parallel connections. Not this problem in the database (but keep in mind that loading several videos at the same time will probably have its price).

4. the documentation recommends that each file will be accessed using an another FileConnection. Simply a connection to a database.

5. in fact, the DB is a file and reading a large file is generally slower than smaller files.

Having said all this, I think you should look again at your request (and the target devices and the end-users) requirements and see what works best.

Hope that helps,

E.

Tags: BlackBerry Developers

Similar Questions

  • Apex BLOB in FILE

    Hello

    I have a problem downloading a document at the APEX. It is transferred automatically as a BLOB object in the table. What I want is to copy in the file system.

    The code I have is tested in an environment not Apex. I just made a table with a BLOB field, make a directory and rights to it to the public, made a bundle and granted it is rights to the public, and here is the procedure

    CREATE OR REPLACE PACKAGE BODY SYS. UploadFile IS

    Procedure BLOB_TO_FILE (p_file_name In Varchar2) is

    l_out_file UTL_FILE.file_type;

    l_buffer Raw (32767);

    l_amount directory: = 32767;

    l_pos Integer: = 1;

    whole l_blob_len;

    p_data Blob;

    file_name Varchar2 (256);

    Begin

    For rec In (Select ID

    Of HTMLDB_APPLICATION_FILES

    Where Name = p_file_name)

    Loop

    Select BLOB_CONTENT, name of file in p_data, file_name from HTMLDB_APPLICATION_FILES where ID = rec.ID;

    --

    l_blob_len: = DBMS_LOB.getlength (p_data);

    l_out_file: = UTL_FILE.fopen ('UPDOWNFILES_DIR', file_name, "wb", 32767);

    --

    While l_pos < l_blob_len

    Loop

    DBMS_LOB. Read (p_data, l_amount, l_pos, l_buffer);

    If l_buffer is not Null, then

    UTL_FILE.put_raw (l_out_file, l_buffer, True);

    End If;

    l_pos: = l_pos + l_amount;

    End loop;

    --

    UTL_FILE.fclose (l_out_file);

    --------------

    End loop;

    Exception

    While others then

    If UTL_FILE.is_open (l_out_file) then

    UTL_FILE.fclose (l_out_file);

    End If;

    end;

    UploadFile END;

    /

    This is the code that I call the procedure inside the Apex:

    BEGIN

    FOR (IN) rec

    Select file name, name

    of htmldb_application_files

    where rownum = 1

    )

    LOOP

    UPLOADFILE. BLOB_TO_FILE (Rec.FileName);

    remove from htmldb_application_files

    where name = rec.name;

    END LOOP;

    END;

    The thing is, with APEX, it doesn't work. To do this, the removal of htmldb... gone, but it does not run the part of the procedure (it does not copy blob on file system).

    I gave grants to the public and anonymous on the directory where the file should be copied and the execution of the procedure.

    Any idea what I need to do in order to make the procedure called?

    Because you call the procedure with the file name and that you use this setting for name search.

    No matter what reason, why you don't call your procedure with the ID? In this case you don't need the cursor for loop in your procedure.

  • Convert binary (Blob) image file to string base64 on PlayBook?

    I need to download image files of the PlayBook to a Web server.

    When you use BB10, it's pretty easy, basically just using reader.readAsBinaryString (file) to get the file as a string, encode in Base64, then send it with xml.send(fileData). Which works very well with my Z10.

    But the PlayBook seems to have its own file system that does not work the same as handling BB10. I can read the file very well with blackberry.io.file.readFile (path, pbOpenImageFile)image, but it gives me just the Blob. How can I get this Blob converted a Base64 string for sending with xml.send (fileData)?

    blackberry.utils.blobToString (blobData) doesn't seem to work, at least not with my image data (works very well with my text files however). He also apparently has a size limit that could be a problem with the images anyway.

    Is it possible to get that converted to a string in Base64 Blob?

    I have it.

    Take the idea of here something like:

    var can = document.getElementById ('canvas');
    var can.getContext ('2d') = CTX;
    var img = document.getElementById ('tweetpic');
    ctx.drawImage (img, 0, 0);
    var b64Text = can.toDataURL ();
    b64Text = b64Text.replace ("data : image/png;") Base64,', ");
    var fileData = b64Text;

    And then xml.send (fileData); as usual

  • dynamically create files (.txt/.doc/.css etc.) and save the table as BLOB without file system reference

    Hi guys,.

    IAM trying to find a plsql/pkg process that creates a file for example myiphones.txt (with content) and save this file as BLOB directly in a table in the DB (not on file system moreove there is no access to the file system) - Ive studied this but nothing about other than as_pdf3 that iam still working on.

    Here are the summarized steps:

    -------------------------------------------

    1. run plsql to create a single file like myiphone.txt,

    2. in this (myiphone.txt) inserts a record content from another table EMP as,

    MYiPhone.txt

    ============

    Greg Taylor,

    Mike Owen

    3 then finally record this (myiphone.txt) in another table MYFILES as BLOB - Note Please that I don't want to not refer to file system manager and I have not access to it for the time being,

    I hope it is clear

    no idea about the way to handle this is appreciated?

    Thank you.

    You can try this:

    Data are from a clob table.

    DECLARE
      L_BLOB BLOB;
      L_CLOB CLOB;
      L_DEST_OFFSET INTEGER := 1;
      L_SRC_OFFSET INTEGER := 1;
      L_LANG_CONTEXT INTEGER := DBMS_LOB.DEFAULT_LANG_CTX;
      L_WARNING INTEGER;
      L_LENGTH INTEGER;
    BEGIN
    
      -- create new temporary BLOB
      DBMS_LOB.CREATETEMPORARY(L_BLOB, FALSE);
    
      --Select CLOB
      SELECT CLOB_VAL INTO L_CLOB FROM MY_TABLE;
    
      -- tranform the input CLOB into a BLOB of the desired charset
      DBMS_LOB.CONVERTTOBLOB( DEST_LOB => L_BLOB,
      SRC_CLOB => L_CLOB,
      AMOUNT => DBMS_LOB.LOBMAXSIZE,
      DEST_OFFSET => L_DEST_OFFSET,
      SRC_OFFSET => L_SRC_OFFSET,
      BLOB_CSID => NLS_CHARSET_ID('WE8MSWIN1252'),
      LANG_CONTEXT => L_LANG_CONTEXT,
      WARNING => L_WARNING
      );
    
      -- determine length for header
      L_LENGTH := DBMS_LOB.GETLENGTH(L_BLOB);  
    
      -- Your custom INSERT INTO statement
      INSERT
        INTO MY_TABLE
         (NAME,
          BLOB_FILE,
          BLOB_LENGTH
         )
         VALUES
         ('lala.txt',
          L_BLOB,
          L_LENGTH
         );
    
      EXCEPTION
      WHEN OTHERS THEN
      DBMS_LOB.FREETEMPORARY(L_BLOB);
      RAISE;
    END;
    

    Concerning

    Tobias

  • Cannot write data blob image file

    Hello

    I am trying to write in a persistent storage of an image blob data... even if I don't get an error, that nothing is written

    window. rootFS.getFile (window. mainDirectory + ' / ' + $scope.) sCurrentDate + "/" + filename. substring (file name of0 . lastIndexOf ('.')) + '.jpg' {create:true} { function(file)

    file.createWriter (function(fileWriter) {}

    fileWriter. write (oXHR. ( responseText) ;
    fileWriter. onwriteend = function (e) {}

    Console. Journal ("file image = >""") ;
    console. Journal (e) ;
    console. Journal (file) ;
       });

       };
    { } { function(error)

    Console. Journal (error) ;
      });
    } { function(e)

    Console. Journal (e) ;
    });

    honestly, I don't know what to try anymore

    Good. So something has changed at the same time, because in your OP, you wrote:

    nothing is written

    and now you say:

    the file is created, but the image link seems broken

    All plugins:

    1. the plugin file is integrated into the plugin to transfer files, so you should not the former.

    2. There is not these plugins by these names on the repo of old, obsolete "bmp".

    3. the latest versions of these plugins to the NPM are 4.2.0 and 1.5.1 so you have included older versions

    4. you must use the latest syntax and NPM and therefore write:

    Now, what is "the link of the image" and how seems to be broken?

  • Essbase Administration Service - create rules SQL file - connection error

    Hello

    I am creating the rules SQL files in Essbase Administration Console.

    When I press the OK/recover button in open SQL data source window I get this error:

    cannot connect to establish a connection with the SQL Server database see log for more information

    I tried the ODBC connections and BEAK .

    When I test the ODBC connection in Windows administrative tools > Data Sources (ODBC) > system DSN, it works correctly. but in open SQL error there.

    I tried two separate databases for my test.

    an Essbase server machine.

    a separate server.

    both give me the same error.

    SRD: 11g R2

    Essbase: 11.1.2

    ODBC1.jpgODBC2.jpgodbc3.jpg

    Do you have any suggestions?

    Create the DSN using DataDirect Oracle Wire Protocol 7.0 in (System DSN) ODBC administrators and test the connection of the Rules file. It will work.

    I think that u used Oracle in oracle11glcinet_home

  • 7 fusion Pro trial has no option for file-&gt; connect to server

    I have just setup an ESXi Server / Fusion 7 so I tried the Pro 7 trial to try to connect for managing virtual machines, but when I download the trial of 7 Pro Installer it honestly looks exactly like 7. What Miss me? The two links here download the same file, and I don't see any option to specify problems in installation: try VMware Fusion or Fusion Pro. Run Windows on a Mac without rebooting. | United States

    Check your license in the VMWare Fusion-> menu license. It will most likely have your Standard license.

    You should be able to temporarily move the license file located in

    / Library/Preferences/VMWare Fusion/license-fusion.

    in another directory in order to start your evaluation Pro. Make sure to close or VMWare Fusion before you move the file or uninstall it completely if just close doesn't work for you

    Concerning

  • Work over long distances of Lightroom w / Smart Previews, file connection issues

    Hello! A person out of State asked me to help make an editing for his studio work. Via Dropbox, she sent a Lightroom Catalog with smart preview that I could modify the images. When I downloaded the catalogue, it is automatically opened in my personal, pre-existing Lightroom Catalog. I was able to edit the files there, and when I did, I exported the images as a new catalogue and placed on an external hard drive to send to her. When she received the drive, she could see the pictures, but all files names were different (about 20 characters), and they would not connect with the original files it owns at its end. Can anyone help to explain why this happened and a fix for this without having to re - edit all the photos? I would be very happy. Thank you!

    Well, the other way is the catalog that you have sent to her, you ask to locate the images, ask him to click about to exclamation and replace the images with what is in the local computer.

    Another way is:

    Download the catalogue

    Open, select the file-> import from another catalog, and then import the updated catalog files.

    Replace the images with the edited one make sure that you do not change the location, but change the name of the images of what it was when it was sent to you.

    Send the catalog.

  • Shared system Libaried and file connection problem

    Hi all

    I am using Jdeveloper 11.1.2.3.0,

    I try to connect to some JAR deployed on the login server (file system), I can see pot but can't add it to the project
    There is no other choice (add to the project). How can I solve it?

    Thanx

    Published by: User1100 on October 6, 2012 06:43

    Therefore, can not be d:\app\..., right?
    Map this folder on a network drive.

    >

    Folder is just a shared folder

    \\server_name\apps\adflibCommonUI.jar

  • For the binary cache as a BLOB or file system?

    I posted this question of AIR on the Flex forum, which did not get much attention, so now I try here which seems more ideal.

    My question in detail:

    Would it be best to store binary files (Images and SWF files) as blobs in the database or to have a URI pointing to them on the user the system of files?

    I am above all a Developer Flex, which did not have much time to development of databases, but realizes there is 2 options to be taken for the storage of binary files in an AIR application.  Given that I have not been exposed to the db development I'm not sure which is the best way.

    You are right there are two options, and they are both commonly used.

    Storage on the file system is a little easier to implement for many and can be a little more proformant with less coding and decoding in progress.  But he has an increased risk of problems of syncornazation since there are many ways for objects of file to be modified, moved, or deleted without changing anything and the database.  Thus, we should build logic that will check the existence of the file at the level of the URI before trying to serve.

    Store the file in the database reduces the problems with syncornazation.  But it takes a little longer to implement and could involve much more data in the database itself, which may or may not be a problem depending on the configuration.

    But either is a choice of acceptiable and a little work with the various advantages and disadvantages of a.

  • Oracle.exe Guard locks a file connection has been closed.

    Hello

    I wrote a windows .net service that monitors a directory for new downloaded files that need to be synchronized with the database. When it detects a new file it moves the file to a different directory from which oracle can reach the file. When the file is moved. I open a connection with the database that is running a select *... on the external table that reads the file. This set works like a charm, and then I have the connection.

    Then, I try to move the file again to another directory, because he was treated, but then I got a System.IO.IOException because the file is locked by a process. When I check how it is oracle.exe and stays locked until I cancel my service. When I debug the service I double checked and the status of the connection is closed before I try to move it again. For some reason oracle.exe locks the file until I kill the service that opened the connection.

    If I need to give more precise information please ask, any help would be greatly appreciated.

    Pieter

    Don't you see the same behavior is you select * from sqlplus to instead of the app from the odp, but do not disconnect the sqlplus session?

    ODP has worn to default, so even if you close and has the connection, the harsh underlying connection remains open.

    I don't know if there is a way to unlock the file without disconnection, which may be the ideal solution, but if not you could probably just turn off connection pooling (pooling = false value in the connection string) to work around.

    It will be useful,
    Greg

  • How can I get rid of the blob.bin files in vista?

    60 GB, 80 GB, now used by this file--what can we do? NB. I am not familiar with computer jargon!

    Please follow the steps below in order to get to step 3.

    1. Open CMD
    2. cd\   (to return to the root/system directory)
    3. CD Windows\Winsxs
    4. C:\>Windows\Winsxs >Net stop trustedinstaller (press enter)

    Also, when you have shown an asterisk in order subsequently lines, do I need to type my password each time that at this time?
     -No, asterisk defines all the files and folder in this directory. You need not write down your password. Just type as it is.
  • Disable tools-&gt; 'pdf export' pane 'create pdf' "send files" "store files" connect on adobe reader.

    Do not use the registry table to disable them.

    I want to use the Acrobat api to do.

    I'm looking to disable all the avtoolbutton by the AVToolButtonSetComputeEnabledProc function, but it is not.

    Thanks for any help.

    There is no API that allows you to remove them.

    You must use the registry for documented/plist keys do according to our business guide.

  • Download BLOB to a file

    Hello

    I have a few spots more than 32000 bytes (that is 160458357 Bytes) and the videos.

    Is there a way to download these BLOBs in files in a single string?

    Please help me.

    Regrads,

    Siegwin

    For example:

    SQL >-check the size of blob
    SQL > select length (awlob)
    sys.aw $2 awcreate
    3 where ps # = 1512
    4 and gen # = 0;

    LENGTH (AWLOB)
    -------------
    1603940

    SQL >-blob of writing to a file
    SQL > declare
    targetfilehandle 2 utl_file.file_type;
    3 v_blob blob.
    number of v_amount 4;
    number of 5 v_pos;
    Number 6 v_len;
    7 v_raw raw (32767).
    Start 8
    9 targetfilehandle: = utl_file.fopen('TEMP','awlob.blob','wb');
    10. Select awlob
    11 in v_blob
    sys.aw $12 awcreate
    where the 13 ch # = 1512
    14 and gen # = 0;
    15 v_amount: = 32767;
    16 v_pos: = 1;
    17 v_len: = length (v_blob);
    18 if v_len > 0
    19 then
    loop 20
    21 dbms_lob.read (v_blob, v_amount, v_pos, v_raw);
    22 utl_file.put_raw (targetfilehandle, v_raw, true);
    23 v_pos: = v_pos + v_amount;
    24 exit when v_pos > = v_len;
    25 end of loop;
    26 elsif v_len = 0
    27 then
    28 utl_file.put_raw (targetfilehandle, null, true);
    29 end if;
    30 utl_file.fclose (targetfilehandle);
    ends 31;
    32.

    PL/SQL procedure successfully completed.

    SQL >-check the size of the file
    SQL > exec dbms_output.put_line (dbms_lob.getlength (bfilename ('TEMP', 'awlob.blob')));
    1603940

    PL/SQL procedure successfully completed.

    SQL >

    SY.

  • Problem with BLOB in a tabular presentation manual

    Hi all

    I created a manual tabular presentation. One of the elements is a BLOB type and shown as file browse on the form.

    I'm going to show a download link when the blob column is not null.

    I searched the forum and tried many ways, but nothing has worked so far. The form is available at apex.oracle.com.

    Here are the credentials to connect:

    Workspace: bobforum

    User: forum

    Password: abc123

    Application: 39196

    Page: 1

    http://Apex.Oracle.com/pls/Apex/f?p=39196:1

    I would be grateful if someone can help on this please.

    Thank you

    Zkay

    Hello

    Check your sample now.

    It should work, when inserting blob column files

    Kind regards
    Jari

Maybe you are looking for

  • Adobe Reader updater - download Reader script error does not occur

    When you access a web page that tries to view a document PDF, Firefox said my plugin needs to be updated and proposes to do. I download the update and run it and it comes up with a dialog box with the information below. Interestingly, even if I'm und

  • Scanning photos of 7520 HP

    Hello I recently bought a HP7520 all-in-one device and I am trying to scan multiple images into a single file and am not invited to "look for another image.  Guests only I get is to save or cancel.  Help please.

  • Notes are not sync and make duplicates

    I upgraded my MacBook air at El Capitan and my mini iPhone6 and iPad iOS 9 all at once. Now, whenever I change an existing note, it creates a new note, so I have duplicates and even triplicates of notes. No notes are sync between my laptop, ipad or p

  • How to enable the microphone boost option?

    I can't seem to find a "mic boost" on Vista Home Premium, and I need it!  Can be activated in some way?

  • The red light blinks and I can't print.

    I reinstalled, activated and deactivated, changed the ink and still no luck.