reading data from files

Hi everyone,

I try data files centimeters and you want to display them in one.

When I debug my program, I got an error no existing file, same iam stores,.

Here is my code can someone help me find the problem

Thanks in advance.

var myFile:File = File.applicationStorageDirectory.resolvePath("abc.txt");
        myFile.createDirectory();

            if(myFile.exists)
                Alert.showAlertDialog("File Found");//i got output as file not found
            else
                Alert.showAlertDialog("File Not Found");

    var fileStream:FileStream = new FileStream();
    fileStream.open(myFile, FileMode.READ);

Hi Sir,

I found the solution,

the problem is that I use ApplicationStorageDirectoy that did not accept my file, applicationDirectory is suitable for access to the content of the data.

Tags: BlackBerry Developers

Similar Questions

  • read data from file FRO HP4192A

    Hello

    I try to read the frequency values txt file. but it counts as a sum of character. for example; 1500000 in the txt file is read 7. What can I do? I have attached my vi and the txt file. Thank you ver much.


  • Select the list box file and read the data from file

    I can list the files in the folder in the listbox

    1. I want to just list file .txt files

    2. How can I read data from the selected file (.txt)?

    I think that's what you want, enter a model in your list of files vi (for example, *.txt) and then just use File.vi text of reading by using the selected item in the list box (double click on event or value change) and use the starting for the vi records list path.  I have included a crude extract for your pleasure.

  • How to read data from several files and add columns in a single file

    Hi guys,.

    I have a problem in adding data from files in different columns. I have the attachment a file A and B which I am reading and not able to get the data in the Result.txt file. Please give your opinion on how can I do this

    You must add the data of all files before proceeding with a single entry.

  • read data from xlsx file

    How to read data from an Excel 2010 worksheet with the .xlsx extension?  The data I want, it's on one of the 10 tabs in the file, I have to choose which programmatically.  I have the Report Generation Toolkit for LV2012, but all the screws that come with it seem to focus around writing data to a spreadsheet Excel and make charts and whatnot.  I want to * read * an Excel worksheet.  Seeking answers led to many 'Open it and save it as tab delimited text', which I can't do because I need data from different tabs, and because this file is quite dynamic with many users opening and adding several times.  In order to save the tab I want as a tab delimited text file per programming, I'm back a square, how to open it?

    My solution would ideally fill in the blanks of: spreadsheet.xlsx---> _---> 2 or 3D data table.

    Thank you

    Adam

    This fixes:

    https://decibel.NI.com/content/docs/doc-3033

  • How to read data from an excel and HTML file

    Hello

    I write a 2D-array of string in Excel/HTML file using the generation of reports.

    Can someone tell me how to get back in return, the written data, same files again and display in table format.

    Thank you & best regards

    Visuman

    You can use activex to read data from the excel fileback to the table format... through this vi... may b this will help you...

  • Reading data from a text (JS CS3) file tabs-delimited

    Hi - I'm working on a script to read data from a text file and use in a dialog box. But I hit a wall.

    I used a script from a previous post that defines a variable text document when the user script he chooses from a drop-down list.

    var myDialog = app.dialogs.add({name:"Map",canCancel:true});)
    {with (MyDialog)}

    {with (dialogColumns.Add ())}
    {with (borderPanels.Add ())}
    staticTexts.add ({staticLabel: "choose the location :"});})
    {with (dialogColumns.Add ())}

    var file = File("~/Desktop/myPlacesfile.txt");

    leader. Open ("r");
    var str = file.read ();
    leader. Close();
    var myPlaceList = str.split (/ [\r\n] + /);
    var myPlaceMenu = dropdowns.add ({stringList:myPlaceList, selectedIndex:0});})
    }
    }}}
    Ditto var = myDialog.show ();
    if(myResult == true) {}
    If (myPlaceMenu.selectedIndex == 0) {}
    myPlace var = ' - undefined ";
    } else {}
    myPlace var = myPlaceList [myPlaceMenu.selectedIndex];
    Alert (myPlace);
    }

    myDialog.destroy ();
    }

    That's what I do now:

    The text file is in this format:

    Value1 value2 [TAB]

    Value1 value2 [TAB]

    Value1 value2 [TAB]

    I need to have the drop down dialog box show only the value 1, and after that the user selects, the script returns only the value 2. (The alert is just there to test - I'm doing something else with the variable).

    Is there a way to view the first part of a tab-delimited line in the menu drop down and return the second half as a variable?

    Any help would be greatly appreciated.

    Thank you

    One of the possibilities is that it. Create a table to the left of the values of the tab of the dialog box. Then create an object that you use it as a table of correspondence. Roughly as follows:

    same thing as what you have

    leader. Open ("r");
    var str = file.read ();
    leader. Close();
    var array = str.split (/ [\r\n] + /);

    'pairs' are the table of correspondence

    pair of var = {};

    as before, 'myPlaceList' will be used for the menu drop-down
    var myPlaceList = [];

    var v;
    for (var i = 0; i)< array.length;="">
    {
    v = table [i] .split ('\t');
    pairs [v [0]] = v [1];
    myPlaceList.push (v [0]);
    }

    Add the drop-down list as before:

    var myPlaceMenu = dropdowns.add ({stringList:myPlaceList, selectedIndex:0});})

    the table of 'pairs' correspondence is used as follows: pairs ['value1'] returns 'value2 '.

    so in your script that would be:

    myPlace var pairs = [myPlaceList [myPlaceMenu.selectedIndex]];

    Peter

  • Can read data from xls using teststand 3.5?

    Hello

    I use 3.5 TestStand and LabVIEW 8.je know these are quite old versions now, but we must continue with this on a test bench.

    My question is how can I read data from the file xls using TestStand 3.5? I have already mentioned a few posts on this, and one response suggested that I should use "tGetExcel" using ActiveX adapter. I tried to run the test example related to "http://forums.ni.com/t5/NI-TestStand/Write-or-read-to-Excel-from-TestStand/td-p/250439/highlight/tru...", but a run-time error. He says that "the tGetExcel type library information not found. Make sure that the server is registered in the system.

    TestStand 4.2, I could easily run excel at the base of operations by using the Office Excel Toolkit.

    I was wondering, is there another way, I can read just .xls file data by using Teststand 3.5?

    Thank you

    Niraj.

    Please check this example for charger of property:

    C:\Program Files (x 86) \National Instruments\TestStand 3.5\Examples\LoadingLimits

    This shows the limits of excel file loading.

    But you can load the values of the variables-consult the help file / Reference manual for this type of step.

    Also in the loader type forum search property - you can find more information.

    I hope this helps.

  • Read data from table of $ E and insert in the staging table

    Hi all

    I'm new on ODI. I need your help to understand how to read data from a table ' E$ "and insert in an intermediate table.

    Scenario:

    The name of two columns, in a flat file, the employee and the employee id must be loaded into a data EMPstore +. A check constraint is added so that the data with the employee names in capital letters only to load in the data store. Check the command is set to the static movement . Right-click on the data store, select control , then check. The lines that have violated the check constraint are kept in E$ _EMP+ table.

    Problem:

    Problem is I want to read the data in the table E$ _EMP+ and transform in capital letters in the name of the employee and move the corrected data of E$ _EMP+ EMP+. Please advise me on how to automatically manage the 'soft' exceptions in ODI.

    Thank you

    If I understand, you want to change the columns in the tables of $ E and then load into the target.

    Now, if you notice how ODI recycles the error, there is an incremental update to the target using the E table $ after he filled the I$ table.

    I think you can do the same thing by creating an interface using the table of $ E as source and implement the business logic in this interface to fill the target.

  • read data from emparray

    I have a function that I would read in pl/sql. How can I read data from it. EMPARRAY function return.

    FUNCTION META_PODATKI_TABEL
    (ime_tabele VARCHAR2, st_napake NUMBER
    )
    RETURN EMPARRAY ACE


    EMPARRAY is:
    create or replace TYPE "EMPARRAY" as VARRAY (10000) OF VARCHAR2 (4000);


    I try but nothing works.

    THX

    Put the function calls in the clause of a query using the TABLE from:

    SQL> create or replace TYPE "EMPARRAY" as VARRAY(10000) OF VARCHAR2(4000);
      2  /
    
    Type created.
    
    SQL> create or replace FUNCTION META_PODATKI_TABEL
      2  (ime_tabele VARCHAR2, st_napake NUMBER
      3  )
      4  RETURN EMPARRAY AS
      5  begin
      6  return emparray('aaa','bbb','ccc');
      7  end;
      8  /
    
    Function created.
    
    SQL> select * from table(META_PODATKI_TABEL('x',1));
    
    COLUMN_VALUE
    ------------------------------------------------------------------------------------
    aaa
    bbb
    ccc
    

    Max
    http://oracleitalia.WordPress.com

  • Read data from APEX_ITEM

    Hi all

    I searched the forums, and unfortunately I have no idea on how to go on the following.

    I have the following SQL report created with APEX_ITEM. SELECT_LIST-

    > select id, questions, APEX_ITEM. SELECT_LIST (p_idx = > 1, p_value = > '- Select Rating-', p_list_values = > 1, 1, 3, 3, 5, 5', p_attributes is > "style =" "color: Black;"', p_show_null = > 'YES', p_null_value = > NULL, p_null_text = > '- Select Rating-', p_item_id = > ' the ROWNUM # f01_ #', p_item_label = > ' label for ROWNUM f01_ # #', p_show_extra = > 'NO') 'Rating' of the sqa_customer_questions by id order

    Query runs as you like, but I don't know how to accept the values of the rows. I would like to insert the values of the selection list and their respective ID for all the entries in another table. I'm not able to find out how I could read data from these APEX_ITEMs and reach my goal.

    Any help is appreciated.

    Kind regards
    Jean-Pierre

    Nope,

    Can you put the app on apex.oracle.com

    In any case if you have a report like this

    SELECT id,
                    something
    FROM table
    

    You can do it for the

     SELECT id||APEX_ITEM.HIDDEN(2,id) id,
                    something
    FROM table
    

    And then reference it as APEX_APPLICATION. G_F02 (the first parameter provided to apex_item determine the number) in your process.

    See you soon

    Ben
    http://www.munkyben.WordPress.com
    Don't forget to mark the answers useful or correct ;)

  • read data from a serial port

    Hello to everyone
    I use oracle forms 6i. I want to read data from a serial port. How can I do this?

    HII,

    You may search for any existing OCX or VBX component capable of doing this job.

    Better compliance
    Skyniazi

  • Read data from the file into ArrayList

    Hello
    I have a class called product describing the charactristics of products such as the name, id, price etc.. I have the whole set and use the get methods in my class of product. I store the information on my products in an ArrayList. I can write the information on my products in a file.
    so far, but so good...

    I want now to re-read the data from the file and store it in my list of tables again. I know I can use Parsing and read in data in an ArrayList as String, int, double etc. but is anyway to read in from 'Product' (then it would be up to my class of product)?

    Thank you in advance.

    1. are you aware of serialization?
    2. get a name, I love not dealing with numbers.

    DB

  • Reading data from text file

    I would like to read data (sepereated of numbers with spaces) and write them in a table. That's what I have so far.

    Thank you.

    Try to use "worksheet reading File.vi. The only thing you will obviously need to change is the delimiter character, which seems to be a white. In the default configuration, spreadsheet files using the tabs as separators...

    Norbert

  • read data from xml file

    Hi all

    I have an xml file store on my bb.

    How can I read data within the tag? I think that one way is to use blackberry.find.FilterExpression (), like the example below. I don't know how... but it's okay. I will try!!

    function handleOpenedFile(fullPath, blobData) {
    
        temp = blackberry.utils.blobToString(blobData);
    
       //var NomeOperatore = blackberry.find.FilterExpression('');
    }
    
    function readPianoViaggi() {
        if (blackberry.io.file.exists(filePath)) {
            blackberry.io.file.copy(filePath, filePath2);
            blackberry.io.file.readFile(filePath, handleOpenedFile);
    
        }
    }
    

    my question is: I can read data within the tag using an operation such as

    itemDescription = temp.getElementsByTagName ('NomeOperatore') var [0].firstChild.data or something similar?

    Thank you

    You would do something like the following... I don't know if my syntax is correct

    function readFile() {
      blackberry.io.file.readFile("file:///store/home/user/sample.xml",handleOpenedFile);
    }
    
    function handleOpenedFile(fullPath, blobData)
    {
      var xmlString = blackberry.utils.blobToString(blobData, null);
      var parser = new DOMParser();
      var doc = parser.parseFromString(xmlString, "text/xml");
    
      var itemDescription = doc.getElementsByTagName('NomeOperatore')[0].firstChild.data;
    }
    

Maybe you are looking for

  • 10.2.4 came out

    Logic Pro X v10.2.4 was released this morning with bug fixes... Hope that helps Edgar Rothermich - LogicProGEM.com (Author of "Graphically improved manuals") http://DingDingMusic.com/manuals/ "I could receive some form of compensation, financial or o

  • Vista Autologon does not work

    Help, please! When Vista will automatically try to connect it says it failed.We have never had a password, just the return key, but it won't give me not even asked to provide the password, just the stupid button.

  • Walkman NWZ-E354BLK play Non - DRM WMA files?

    I want to know before buy you. Player Mp3 Walkman NWZ-E354BLK plays WMA files are unprotected by the management of digital rights (DRM)?

  • Why does not update silverlight kd2690729

    I have windows xp, I've tried to uninstall and it will not uninstall either

  • Aspire 5742 Bluetooth Stacker stopped working.

    Immediately after, boots mobile message "Bluetooth stack has stopped working". There are two options 1) search on the web for the solution and close the program 2) close the program. There is no need to select option 1. It provides no solution or inf