Determines the default setting for the DF_FILE_MAX_ROWS_FETCHED attribute when creating new tables in a structure operation.
Database
The DataFlex SQL Drivers (SQL Server, DB2 and ODBC), revision 5 and higher
Integer, temporary
Read/Write
0..
Use cli.pkg
Get_Attribute DF_DATABASE_DEFAULT_MAX_ROWS of {driverNumber} {databaseHandle} to {IntegerVariable}
Set_Attribute DF_DATABASE_DEFAULT_MAX_ROWS of {driverNumber} {databaseHandle} to {IntegerVariable}
Sets up the default setting for the DF_FILE_MAX_ROWS_FETCHED value that will be used when a table created.
The default setting is used when creating tables, the value is included in each [table.]INT file.
So, the value of the DEFAULT_MAX_ROWS keyword set in the [database.]INT will be used as the initial value for the keyword MAX_ROWS_FETCHED in the [table.]INT when each table is created. The value of the MAX_ROWS_FETCH keyword in the INT file will be used in SELECTs that are generated for FINDs performed against the tables.
Tables can be created during conversion or within a restructure operation.
Procedure ShowDBAttribute Integer iDriver Handle hDatabase
Integer iAttribValue
Get_Attribute DF_DATABASE_DEFAULT_MAX_ROWS of iDriver hDatabase to iAttribValue
Showln "Default max rows: " iAttribValue
End_Procedure
The sample code above shows the current setting for a given database. The database handle can be obtained via the DF_DATABASE_ID attribute.
For some back-ends, restricting the size of the result set increases performance. We found this to be the case for MySQL, for example.