• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
RE: Memory management
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Memory management


  • Subject: RE: Memory management
  • From: Marius Strumyla <email@hidden>
  • Date: Tue, 16 Mar 2004 17:19:59 -0500

See below...

Richard Bruch wrote:

> Hi Arturo
>
> here is my code so you can see what goes on. The question is whether there
> is a means to get this code working for large queries.
>
>   try
>   {
>       PrintWriter pw = new PrintWriter(new FileOutputStream(tableName +
> ".dat"));
>       EODatabaseChannel dc = dctx.availableChannel();
>    ac = dc.adaptorChannel();
>    if(!ac.isOpen())
>     ac.openChannel();
>    ac.evaluateExpression(EOSQLExpression.expressionForString(stmt));
>    ac.setAttributesToFetch(ac.describeResults());
>    NSDictionary row = null;
>    while((row = ac.fetchRow()) != null)
>    {
>        for(i = 0; i < fieldCount; i ++)
>     {
>         Object res = row.objectForKey(keys.objectAtIndex(i));
>      if(i > 0)
>       pw.print('\t');
>      if(res != null && res != nullVal)
>       pw.print(res);
>     }
>     pw.println();

Would calling pw.flush() here help a little?

>    }
>    pw.close();
>   }
>   catch(Exception e)
>   {
>       System.out.println("Error occured: " + e);
>       try
>    {
>        if(ac != null)
>      ac.cancelFetch();
>    }
>    catch(Exception xe)
>    {
>    }
>   }
>
> Thank you
>
> Richard
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.


  • Prev by Date: Re: Memory management
  • Next by Date: Re: WROXComponent Example
  • Previous by thread: Re: Memory management (streaming large fetches)
  • Next by thread: WROXComponent Example
  • Index(es):
    • Date
    • Thread