maximum rows in memory

Discussions specific to Team Developer 5.1.

maximum rows in memory

Postby » Tue Jul 19, 2011 11:07 am

Can you change the table windows attribute "maximum rows in memory" during initialization via obtaining the parameter in an init file or a db query?


Gupta Vet
Posts: 16
Joined: Thu Jan 31, 2008 8:38 am

Re: maximum rows in memory

Postby Jeff Luther » Wed Sep 14, 2011 12:04 pm

Kind of late in replying to your question :oops: but my response would be: Why would you need to change Max Rows?

Max Rows = <> is a value that tells the TW/GRID how large it can grow. TD never pre-allocates that number of rows, even if something like 1000000 (one million). That max. value is only used as a stopping point and lets the TD grow to that limit as rows are fetched. Couple other points:

* If you set max rows = <XXX>, then you should set attribute Discardable: No, so once rows are fetched, though unlikely with a large max value, they don't get swapped out.

* Don't forget... original SQLWindows v1 came out in Sept, 1988 (I was there) and these cache settings for the TW were then set and used because of early 16-bit Windows, the fact that memory capacity was low (remember 386?, extended/expanded memory?) when everything running had to live in 512K (!) or 628K or whatever it was. And the luxury of a TD getting populated with 100,000 rows wasn't really an option.

Point is, TW should be something like max = 1,000,000 and discard = No. And forget it. Oh, but do trap SAM_CacheFull, just in case the limit is reached and you want to do some error handling. But as the age-old question used to be (and still is) asked in response:
Why on earth would anyone want to populate and view a TW with a million rows of data?!?

(And BTW, changing an attribute can be coded using the CDK; there's just not a Sal function for changing the max. rows value. In the CDK the method is: cdkItem.SetAttribute(). So you could get a value from somewhere and change the TW setting. But you don't need to, as I explain above.)
Jeff Luther

Return to Team Developer 5.1

Who is online

Users browsing this forum: No registered users and 1 guest