MaxFetchBuffer

Description

Sets the maximum size of the buffer into which theDataWindow object can fetch rows from the database. Using the MaxFetchBuffer parameter with the Block parameter can improve performance when accessing a database in PowerBuilder.

Applies to

Syntax

MaxFetchBuffer=buffersize

Parameter

Description

buffersize

The number of bytes the fetch buffer can hold.

Default

5000000 (bytes)

NoteUsing the default buffer size You should not have to set a non-default value for MaxFetchBuffer. In most cases, the default buffer size should meet your needs.

Usage

You can use the MaxFetchBuffer database parameter in conjunction with the Block database parameter to improve performance when the size of a row is very large.

The size of the actual fetch buffer is the product of the value of the blocking factor and the size of the row. If the fetch buffer required by the blocking factor and the row size is greater than the value of MaxFetchBuffer, the value of the blocking factor is adjusted so that the buffer is not exceeded.

For example, if block=500 and the row size is 10KB, the fetch buffer is 5000KB, which equals the default maximum buffer size.

You can set Block and MaxFetchBuffer dynamically in code after connecting to the database. MaxFetchBuffer cannot be set in the Database Profile Setup dialog box.

Examples

Example 1

The following example sets the maximum fetch buffer size to 6000KB and the blocking factor to 500:

SQLCA.DBParm="MaxFetchBuffer=6000000,block=500"

See also

Block (ODBC, OLE DB, Oracle, and SNC)