Opening and closing files

I'm currently writing a financial tracking program for the mobile phones and since I need a number of files to work with each time, my idea is to work with only one file opened at a time (since I don't want to open too much files that could slow down the phone). My question is, is it possible to open/create a file and close it, and then open it and close it everytime I need some info from the file? If it isn't possible, is there any other way to do this? Any suggestions will be appreciated.
Thanks.

I assume that you mean "record stores" as opposed to "files" in your question as you mention that you intend to use RMS . Your MIDlet Suite can open/create record stores using the method openRecordStore which returns an object of type RecordStore. There are a number of methods that can be used on this return value for more detailed access. RecordStores are closed with closeRecordStore method that only completes if all outstanding opens have been matched with a corresponding close operation.
Hope that helps!
MJ

Similar Messages

  • TS3212 ipad typing and opening and closing files on it own

    ipad typing and opening and closing files on it own. how is this fixed

    We tried that - it didn't work. We have phoned the nearest Apple store, where we bought the tablet. I see another 125mile excursion in our near future.
    PS- When we phoned Apple support, we struggled to explain ourselves to a call center employee who simply could not understand American English. Apple, many large companies stopped using call centers in Mumbai because of the language difficulty - you should too.

  • Opening and closing files very slowly -MAC - Batch processing broke illustrator...

    I have been batch processing between 15 and 30 thousand svg files over the past few days(simply centreing the orbjects on the art board mergring overlapping objects and saving as AI's) - the individual files are very small 20kb max. this was working fine for a while but suddenly illustrator now takes nearly 30 seconds to open any one individual file - svg or otherwise - and also when I look at illustrator in activity monitor as files are opened illustrator uses 100% of the CPU.
    I have no Idea if this is related to all of the batch processing Ive been doing lately but Its the last thing Ive done so...
    Also I have run disk utility on my machine uninstalled and reinstalled illustrator with no success..
    Anyone have any thoughts?
    Thanks!!

    Have you tried at least restarting AI or rebooting the computer?

  • PDF files opening and closing slowly in Acrobat version 9.5.2.

    I am running Acrobat 9.5.2.  Last week our server died at work and we converted to a new one.  Since then pdf files have been opening and closing very slowly, sometimes taking 15+ seconds to close.  Strangely enough, if you open and close several in a row then they usually open and close quickly with some exceptions, but if you wait 10+ seconds and then try to open or close one it takes forever.  This happens whether or not the machine is connected to the server.
    I tried to do a repair, however it said that it could not connect to the my documents folder at the old server location.  When I originally installed Acrobat, it was done through my University and not while I was even connected to my work server, so that is confusing to me.  Please help, as I use pdf's constantly and this is really slowing me down.

    It doesn't seem like an Acrobat problem per se but a problem with they way your computer is configured to reach the new server. Perhaps you need to have someone come and look at how your computer is configured to reach the new server.  It could also be a problem with how the university configured their server. Server issues are something that cannot easily to diagnosed remotely.

  • Combine supported files is not automatically opening and closing source applications?

    On my Vista 64 machine, suddenly, the "Combine supported files in Acrobat" has begun malfunctioning. Instead of automatically opening and closing the source application (such as MS Word), Acrobat opens the application and then asks to save a new PDF file for each source file and stalls out the conversion. This problem is not happening on my Win XP machine. I have used the 'Repair Acrobat Installation' function but the problem is not corrected.
    Thanks for any suggestions.

    Just to close out this thread, the bug was fixed with the latest version of Acrobat Pro Extended (9.3.3).

  • Reg: Open and Closed Activities in DTR

    Hello Guru's,
    I am confused with the Open and Closed Activities in DTR, What are the significance of these activities?
    And when does an Open Activity changes to Closed Activity?
    And why does an Empty Open Activity gets created?
    How does the Open Activities effect the Performance of the system?
    In NWDS what is the significance of the Public Part and the dcdef xml files?
    Please explain and if possible send the links to better understand these? I tried searching for info but with no luck.
    Appreciate the Help.
    Thanks & Regards,
    Pramod

    Dear Pramod,
    Activity in general can be considered as the wrapper of your changes.
    While working in NWDI, any modification that you perform on your source code must be associated with an Activity.
    Some Definitions:
    Client DTR: Represents the Local Track file system present on you local machine, where Checked-out a desired code from Server DTR
    Server DTR: Represents the Central Repository present on the server, where your source code is checked-in.
    Open Activities
    These are the activities that are not yet checked-in to Server-DTR, and they represent the Open Version.
    Exmple:
    1) Suppose you have made some modification in "File A" which is associated in Activity-1
    2) When you open the DTR Perspective in your Developer studio, you will be able to see all the changes that you have associated in the Activity-1, this DTR-perspective of your NWDS is also termed as Client-DTR.
    3) But, when you open the Server-DTR in DTR Web interface, you will not be able to see the same file structure that is present in your client DTR, it will not contain the changes that you have incorporated in Activity-1.
    4) The changes present in Activity-A are not available to any other developers, even if you try to use the same developer ID and load the same track, the activities are still said to be purely Local.
    Closed Activities
    These are the activities that are already Checked-in to Server-DTR and they represent Closed Version.
    Example:
    1) In the same example explained above assume that we now Check-in the Activity-1.
    2) Now, if you open the Server-DTR in DTR Web Interface, you will be able to see the same file structure that is present in your Client-DTR.
    3) Now the changes that were present in Activity-A are also available to other developers too.
    Open Activity and Performance
    1) Open Activities create a temporary entry point reference on the Server DTR you can serach for open activities in Secer DTR web interface, every single activity occupies space on your local machine. So it may affect the performance only if the activity count is very high.
    2) In the local file system, the meta data is stored in the .dcdef file in the _comp
    subfolder.
    3) The meta data is stored in the .dcdef file, every public part has its own meta data file. They are located in the def subfolder of the component and have the fileextension pp.
    Every component (DC) is defined by a set of files, stored and versioned together with the
    component in the repository.
    u2022 A file with the reserved name .dcdef stores the basic attributes such as name,
    description and component type, the parent component (if there is one), a list
    of child components (if there are any), a list of dependencies, links to the component
    sources, and the access control list. The .dcdef file must be stored directly
    in the _comp folder.
    u2022 The folder _comp/def contains one file for each public part of the component,
    which carries the name of the public part with the extension .pp. This file contains a list
    of the development objects belonging to the public part and an access control list for
    this public part.
    Both .dcdef and .pp files are stored in an XML-based format; you can display them in the
    content display of the Repository Browser or with any text editor. However, this is
    not necessary. To create and edit these files, use the component tools of the SAP NetWeaver
    Developer Studio.
    In exceptions, you can manually repair the .dcdef or a .pp file of a component.
    Note that direct manipulations are dangerous and can render a component
    unusable.
    I hope you will get a clear picture now.
    Regards,
    Shreyas Pandya

  • Open and closed hand cursors

    I have a drag image application and I wanted to use the open and closed hand cursors to move the image about. It seems there is no easy way of accessing these in Java. After searching for cursor names etc.. I decided to hard code the cursors from the .gif image. Also I didn't want the .GIFs as files as this adds to loading problems so I ended up using arrays of pixels that took a little while to enter.
    I'm giving you the code if you ever need to use it as I typed it in and wouldn't want anyone else to have to do the same.
    int curWidth=32;
                   int curHeight=32;
                   int curCol;
                   Image img;
                   int x,y;
                   int closed_black[] = { 6,5,7,5,9,5,10,5,12,5,13,5,5,6,8,6,11,6,14,6,
                             15,6,5,7,14,7,16,7,6,8,16,8,5,9,6,9,16,9,4,10,
                             16,10,4,11,16,11,4,12,15,12,5,13,15,13,6,14,14,14,
                             7,15,14,15,7,16,14,16,0};
                   int closed_white[] = { 6,4,7,4,9,4,10,4,12,4,13,4,5,5,8,5,11,5,14,5,15,5,
                             4,6,6,6,7,6,9,6,10,6,12,6,13,6,16,6,4,7,15,7,17,7,
                             5,8,17,8,4,9,17,9,3,10,5,10,15,10,17,10,3,11,17,11,
                             3,12,16,12,4,13,16,13,5,14,15,14,6,15,15,15,6,16,
                             15,16,7,17,14,17,0};
                   int closed_whiteruns[] = {6,13,7,15,7,15,5,15,5,15,5,14,6,14,7,13,8,13,8,13,0};
                   int open_black[] = { 10,3,11,3,6,4,7,4,9,4,12,4,13,4,14,4,5,5,8,5,9,5,12,5,
                             15,5,5,6,8,6,9,6,12,6,15,6,17,6,6,7,9,7,12,7,15,7,16,7,18,7,
                             6,8,9,8,12,8,15,8,18,8,4,9,5,9,7,9,15,9,18,9,3,10,6,10,7,10,
                             18,10,3,11,7,11,17,11,4,12,17,12,5,13,17,13,5,14,16,14,6,15,
                             16,15,7,16,15,16,8,17,15,17,8,18,15,18,0};
                   int open_white[] = {10,2,11,2,6,3,7,3,9,3,12,3,13,3,5,4,8,4,10,4,11,4,15,4,
                             4,5,6,5,7,5,10,5,11,5,13,5,14,5,16,5,17,5,4,6,6,6,7,6,10,6,
                             11,6,13,6,14,6,16,6,18,6,5,7,7,7,8,7,10,7,11,7,13,7,14,7,17,7,
                             19,7,4,8,5,8,7,8,8,8,10,8,11,8,13,8,14,8,16,8,17,7,19,8,3,9,6,9,
                             16,9,17,9,19,9,2,10,4,10,5,10,19,10,2,11,18,11,3,12,18,12,4,13,
                             18,13,4,14,17,14,5,15,17,15,6,16,16,16,7,17,18,17,7,18,16,18,
                             8,19,15,19,0};
                   int open_whiteruns[] = {9,14,8,17,4,16,5,16,6,16,6,15,7,15,8,14,9,14,9,14,0};                    
                   int pix[] = new int[curWidth*curHeight];
                   for(y=0; y<=curHeight; y++) for(x=0; x<=curWidth; x++) pix[y+x]=0; // all points transparent
                   // black pixels
                   curCol=Color.black.getRGB();
                   int n=0;
                   while(closed_black[n]!=0)
                        pix[closed_black[n++]+closed_black[n++]*curWidth]=curCol;
                   // white pixels
                   curCol=Color.white.getRGB();
                   n=0;
                   while(closed_white[n]!=0)
                        pix[closed_white[n++]+closed_white[n++]*curWidth]=curCol;
                   // white pixel runs
                   n=0;
                   y=7;
                   while(closed_whiteruns[n]!=0) {
                        for(x=closed_whiteruns[n++];x<closed_whiteruns[n];x++)
                             pix[x+y*curWidth]=curCol;
                        n++; y++;
                   img = createImage(new MemoryImageSource(curWidth,curHeight,pix,0,curWidth));
                   closedhandCursor = Toolkit.getDefaultToolkit().createCustomCursor(img,new Point(5,5),"closedhand");
                   for(y=0; y<=curHeight; y++) for(x=0; x<=curWidth; x++) pix[y+x]=0; // all points transparent
                   // black pixels
                   curCol=Color.black.getRGB();
                   n=0;
                   while(open_black[n]!=0)
                        pix[open_black[n++]+open_black[n++]*curWidth]=curCol;
                   // white pixels
                   curCol=Color.white.getRGB();
                   n=0;
                   while(open_white[n]!=0)
                        pix[open_white[n++]+open_white[n++]*curWidth]=curCol;
                   // white pixel runs
                   n=0;
                   y=9;
                   while(open_whiteruns[n]!=0) {
                        for(x=open_whiteruns[n++];x<open_whiteruns[n];x++)
                             pix[x+y*curWidth]=curCol;
                        n++; y++;
                   img = createImage(new MemoryImageSource(curWidth,curHeight,pix,0,curWidth));
                   openhandCursor = Toolkit.getDefaultToolkit().createCustomCursor(img,new Point(5,5),"openhand");
                   setCursor(openhandCursor);you need to define openhandCursor and closedhandCursor with your other cursor definitions (I made them default to start with) and then just use setcursor as normal. There must be an easier way to do this!
    p.s. thanks to Martin Zvarik for the original code here: http://www.jguru.com/faq/view.jsp?EID=9958

    Hi,
    you can use the same query...Also check the new code after the select..
    SELECT BUKRS BELNR GJAHR <b>BSTAT</b>
    FROM BKPF
    INTO TABLE T_BKPF
    WHERE BUKRS = P_BUKRS
    AND BSTAT IN ( ' ' , 'A' ) " ' ' - Normal document, A - Parked doc
    AND BLART = P_BLART
    AND CPUDT IN SO_CPUDT " Selection screen input.
    IF NOT T_BKPF[] IS INITIAL.
    SELECT BUKRS BELNR GJAHR BUZEI EBELN AUGBL AUGBT
    INTO TABLE T_BSEG
    FOR ALL ENTRIES IN T_BKPF
    WHERE BUKRS = T_BKPF-BUKRS
    AND BELNR = T_BKPF-BELNR
    AND GJAHR = T_BKPF-GJAHR
    AND EBELN IN SO_EBELN " selection-screen input
    ENDIF.
    LOOP AT T_BKPF.
    Parked
      IF T_BKPF-BSTAT = 'A'.
        WRITE: / T_BKPF-BELNR , ' - Parked'.
    process the next record.
        CONTINUE.
      ENDIF.
    Check for Open / Closed.
      LOOP AT T_BSEG WHERE BELNR = T_BKPF-BELNR
                                   AND      BUKRS = T_BKPF-BUKRS
                                   AND      GJAHR = T_BKPF-GJAHR
                                   AND      AUGBL <> ' '.
        EXIT.
      ENDLOOP.
    If the return code is 0 then the document is cleared..
      IF sy-subrc = 0.
        WRITE: / T_BKPF-BELNR , ' - Closed'.
    Else the document is not cleared.
      ELSE.
        WRITE: / T_BKPF-BELNR , ' - Open'.
      ENDIF.
    ENDLOOP.
    Thanks,
    Naren

  • Open and closed cursor

    I have some doubts/questions .
    What is the difference between open and closed cursor?
    Are library cache locks same as parse locks?
    What is the difference between latch and mutex?
    I would be grateful if experts could answer these questions.
    Regards

    Almost correct. The terminology is however nor correct.
    Simplistically:
    The SQL engine receives a SQL. It attempts a soft parse first. This means looking for an existing cursor in the Shared Pool with the same SQL. This existing cursor can be in use by other sessions. It does not matter - if that cursor is in used (opend by other sessions), or not. It may not be in use at all and simply sitting there in the cache. If such a cursor is found, it is used for that session's SQL - and that session gets a cursor handle (reference/pointer) to that existing cursor.
    If the SQL engine does not find an existing cursor to use, it needs to create a brand new cursor in the Shared Pool. This is a hard parse. Again, the session receives a cursor handle for that new cursor created.
    And that is it.
    You now need to decide how to use that cursor handle. The cursor itself is a program. You have a handle to execute that cursor program. Via its bind interface you can input data to this cursor program. Then execute it and receive (fetch) output of that cursor program.
    So the ideal is to re-use the cursor handle again and again.
    Basic example: the following is not optimal as the same cursor is opened and closed, opened and closed, for each read from the file. A lot of soft parsing results.
    while not-eof( filehandle )   // read data from a file
      read file data into var1, var2
      open cursor for 'insert into testtab values( :1, :2)'   // create a cursor
      bind cursor :1 = var, :2 = var2  // bind values to cursor (for insert)
      exec cursor // do SQL insert
      close cursor 
    end whileThis is a lot better. A single cursor is used and executed again and again:
    open cursor for 'insert into testtab values( :1, :2)'   // create a cursor
    while not-eof( filehandle )   // read data from a file
      read file data into var1, var2
      bind cursor :1 = var, :2 = var2  // bind values to cursor (for insert)
      exec cursor // do SQL insert
    end while
    close cursor  In this case a single soft/hard parse - and the client uses that cursor handle to execute that cursor (insert data) program again and again.

  • Opening and closing balances

    Hi sapgurus
    I need a report with similar to MB5B at particular posting date with opening and closing balances but I am unable to download the report to excel the data with MB5B tranasaction.Is there any similar transaction with same output values which can be easily transported to excel from Sap.
    Thanx

    Hi,
    I tested in ECC6.0 and i could able to do so, you try as mentioned below.
    In the output screen of MB5B, goto menu details > click on list > select save > select file > select spreadsheet. Here you can save tthe output in excel format.
    Regards,
    Prabu

  • Opening and closing Access database in a loop causes an Error.

    I am loading test conditions from an Access DB in a multiple nested loop. The loops successively drill into the DB. ei Temperature, Humidity, Power. Consequently the DB is opened and closed numerous (2000) times. The Errors returned are(-2147467259) Unspecified Error or (2147024882) System Resources low. I have disabled result recording in the edit sequence properties dialog. I do see a constant memory consumption, but of 128MB, it never gets below 40MB. I have enclosed the example sequence file I am using.
    Attachments:
    Open-Close.seq ‏35 KB

    Jacy,
    "jacy" wrote in message
    news:[email protected]..
    > I am loading test conditions from an Access DB in a multiple nested
    > loop. The loops successively drill into the DB. ei Temperature,
    > Humidity, Power. Consequently the DB is opened and closed numerous
    > (2000) times. The Errors returned are(-2147467259) Unspecified Error
    > or (2147024882) System Resources low. I have disabled result recording
    > in the edit sequence properties dialog. I do see a constant memory
    > consumption, but of 128MB, it never gets below 40MB. I have enclosed
    > the example sequence file I am using.
    I've seen problems with OLEDB (which I assume TestStand used behind the
    scenes) with Access and SQL where rapid opening/closing of the sam
    e source
    (database) can generate errors. I don't know for sure, but I assume that
    the changes from the last close are not fully propogated before the next
    open is processed.
    Getting back to TestStand, if all the tables you're querying are in the same
    database, then you should just open the database once at the beginning and
    close it at the end. Then do seperate table open/closes between the
    database open/close.
    Bob.

  • Is there a way we can edit and improve existing youtube videos by using premiere pro? Just simple changes like having professional looking opening and closing credits?

    Is there a way we can edit and improve existing youtube videos by using premiere pro? Just simple changes like having professional looking opening and closing credits?

    Assuming you do not have access to the "original" video/project and the YouTube video is the only copy, there is a method. Try "YouTube Downloader" which is a free software that allows you to download clips from YouTube as .mp4 files. You can then edit with Premiere, and re-encode again for upload to YouTube. Just keep in mind that you are re-compressing the video so there will be some quality loss. The better the quality of the original, the better the copy will hold up.
    Thanks
    Jeff Pulera
    Safe Harbor Computeres

  • Spry problems in IE, menus stuttering when opening and closing

    I just intserted some spry collapsible panels into a dreamweaver page I am developing but when I preview the pages in IE8
    the spry menus stutter and shake when opening and closing.
    Does anyone have any idea what is causing this?

    alexk2077 wrote:
    I just intserted some spry collapsible panels into a dreamweaver page I am developing but when I preview the pages in IE8
    the spry menus stutter and shake when opening and closing.
    Does anyone have any idea what is causing this?
    That is strange, I just did the same without any problem.
    I did use the original Spry files (JS and CSS).
    How about you, are you using the original files or are you using your own modified files?
    Ben

  • IPhoto 6 slow when opening and closing

    My wife has a love-hate relationship with iPhoto. iPhoto takes time to open and close. Here is my observations:
    1) MacBook Pro with 512MB and 10 000 pics.The file Library6.iphoto is 130MB and I realized that each operation in iPhoto recreates this file (using the temporary file Library6.temp). It probably explains much of the slowness.
    2) iMac Intel with 1GB and 7 000 pics (subset of the previous 10 000). Now the Library6.iphoto is 17MB. What a difference! Opening and closing time quite acceptable.
    I read a lot of articles on the subject and I don't think that the problem is explained by EXIF info.
    More memory probably makes a difference, but not much.
    The real issue is probably the size of the Library6.iphoto file. I would so much like to take an inside look to each record of this file!
    Is anyone has an idea?

    denismailloux:
    Welcome to the Apple Discussions. Both libraries are at version 6, right? If the one with the 130MB data file is at V5 that would explain the slowness. Have ou tried rebuilding the library by launching iPhoto with the Command+Option keys depressed and follow the instructions to rebuild the library. Select just the option to rebuild the database. See if that won't give you a smaller Library6.iPhoto file.
    Another possibility, if the normal rebuild doesn't do the trick is to rebuild the library with
    Using iPhoto Library Manager to Rebuild Your iPhoto Library
    Download iPhoto Library Manager and launch.
    Click on the Add Library button, navigate to your User/Pictures folder and select your iPhoto Library folder.
    Now that the library is listed in the left hand pane of iPLM, click on your library and go to the File->Rebuild Library menu option
    In the next window name the new library and select the location you want it to be placed.
    Click on the Create button.
    Note: It can take some time to create the new library if you have a lot of photos. One user reported that with a library of about 5,000 images it took about 12 hours so plan ahead.
    It does not touch or modify the original library so there's no danger of the process messing it up. Worth a try.
    Do you Twango?

  • Finder doesn't stop opening and closing!

    Help!
    I was playing Sims 2 (an addiction) a few minutes ago, and I took some video captures. When I tried opening and viewing them on Quicktime, OS X started acting up. Finder won't stop opening and closing now, it opens and closes almost instantly. It all started happening when I tried opening Quicktime. I tried searching Apple.com, and the web for answers and I haven't had any luck. My system's specs are:
    Mac Mini 1.42Ghz
    1GB of RAM (recently installed)
    Mac OS X Tiger 10.4.7
    At the time the problem occured, I was running AIM, Sims 2, and Quicktime. This has never happened before. I tried Shutting Down and coming back again but it kept doing it. I removed the Sims 2 CD and shut down and after awhile turned it back on, still on going. Right now the computer went into Screen Saver mode and I can see the cursor blinking in and out...
    Please help this is really frustrating...
    Mac Mini 1.42Ghz   Mac OS X (10.4.7)   1GB Ram

    See if you can boot up in safe mode. To do so, restart and hold down the shift key until it boots. It will take longer to boot because it will be running a file system check while booting so be patient.
    If that helps try rebooting again the normal way.
    If the problem comes back when you boot the normal way then reboot in to safe mode again and then try deleting the finder preferences file. Instructions on how to do this are available here:
    http://www.thexlab.com/faqs/finder.html
    I would then do some basic maintenance on your Mac as outlined in the following FAQ, just to be on the safe side.
    http://www.thexlab.com/faqs/maintainingmacosx.html

  • MB5B Report table for Open and Closing stock on date wise

    Hi Frds,
    I am trying get values of Open and Closing stock on date wise form the Table MARD and MBEW -Material Valuation but it does not match with MB5B reports,
    Could anyone suggest correct table to fetch the values Open and Closing stock on date wise for MB5B reports.
    Thanks
    Mohan M

    Hi,
    Please check the below links...
    Query for Opening And  Closing Stock
    Inventory Opening and Closing Stock
    open stock and closing stock
    Kuber

Maybe you are looking for