>
> I've got a huge table (about 60,000 entries), let's call it
> HUGETABLE. It consists of two columns, HT_ID and NAME. I'm
> referencing to it via a foreign key in another table.
>
> I tried to use this command:
> <db:dataLabel fieldName="HT_ID">
> <db:queryData name="aQuery" query="select HT_ID, NAME from
> HUGETABLE" /> </db:dataLabel>
>
> But this takes a very long time, sometimes even producing a
> java.lang.OutOfMemoryException!
That's correct, the query first retrieves all your 60000 rows from the database.
>
> So I tried to specify the query:
> <% String query = "select HT_ID, NAME from HUGETABLE where HT_ID=" +
> currentRow_ACTUALTABLENAME.get("HT_ID"); %>
> ...
> <db:queryData name="aQuery" query="<%= query %>" />
Will help!
>
> This works fine for the first entry, but the other ones are
> displayig their HT_ID instead of the name. I guess, this
> query is only executed once, not every cycle of db:body, so I
> cannot use this way either.
Set the disableCache attribute to true. Default is false so that data will be cached.
For details see taglib documentation of queryData.
Regards,
Henner
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
DbForms Mailing List
http://www.wap-force.net/dbforms