[]
RowsToScan is a connection string property. It is used to specify the number of rows representing the virtual database from local files that should be scanned. This scanning process helps to accurately assign data types based on the section of the table being read.
When creating the connection string, you can define this property as a string. For example:
connectionString = @'....detectionscheme=RowScan;rowstoscan=2000;...';
or using the connection string builder of a specific Provider:
C1[Provider]ConnectionStringBuilder builder = new C1[Provider]ConnectionStringBuilder();
builder.DetectionScheme = DetectionSchemeType.RowScan;
builder.RowsToScan = 200;
When 'DetectionScheme' is not specified, 'RowsToScan' will be ignored, and the data type for each column will default to 'string'. The default value for 'RowsToScan' is set at 500 rows.
The allowed values for 'RowsToScan' are as follows:
Every value lower than -1 will throw an error of type C1DataConnectorProviderException with the appropriate message: “Value of RowsToScan cannot be less than -1.”
Guid
char
String
Numbers
Normally if a column contains only one data type that is the data type of the whole column.
If a column contains a String, then the whole column is treated as a column that holds strings.
If a column contains two different data types, then the whole column will be treated as a string.
Exception when column holds numeric values but different types of numbers:
Case 1: Floating numbers and AssignedNumbers or UnassignedNumbers then the whole column will be treated as it contains only floating numbers.
Case 2: AssignedNumbers and UnassignedNumbers : the best types that will result in the lowest memory occupied.