Block (DirectConnect and Adaptive Server Enterprise) database parameter
Description
Specifies the internal blocking factor used by the Sybase
Client Library (CT–Lib) interface when declaring a cursor.
The blocking factor determines the number of rows fetched from the
database at one time when CT-Lib makes a physical request for data.
The Block DBParm parameter applies only to declared cursors
and not to DataWindow objects.
Controls
-
ASE, SYC, and SYJ Sybase
Adaptive Server Enterprise -
DIR Sybase DirectConnect
Syntax
|
1 |
Block=<span>blocking</span>_<span>factor</span> |
|
Parameter |
Description |
|---|---|
|
blocking_factor |
The number of rows fetched from the database |
Default
Block=100
Examples
Example 1
To set the blocking factor to 1000 rows:
-
Database
profileType the following in the Retrieve Blocking Factor box on
the Transaction page in the Database Profile Setup dialog box:11000 -
Application
Type the following in code:
1SQLCA.DbParameter="Block=1000"
Example 2
The following embedded SQL statements
show how to set the blocking factor in code and use it to declare
a cursor. These statements set the blocking factor to 1000 rows
and declare a cursor that uses this internal blocking factor.
|
1 |
SQLCA.DbParameter="Block=1000" |
|
1 |
DECLARE dept_cursor CURSOR FOR |
|
1 |
SELECT dept_id, dept_name FROM department |
|
1 |
USING SQLCA; |
|
1 |
OPEN dept_cursor; |