The Schema collections return metadata for the Advanced SQL Engine objects. The notable metadata columns for the MBR data type are:
Column Name | Description |
---|---|
COLUMN_TYPE or DATA_TYPE |
Set to MBR. |
FORMAT | Format assigned to the SQL Engine object. |
PROVIDERDBTYPE | Set to DBNull.Value |
The TdDataReader.SchemaTable returns result set metadata. The notable metadata columns for the MBR data type transformed to VarChar(256) are:
Column Name | Description |
---|---|
ColumnSize | Returns the maximum length of the column in Characters; in this case 256. |
DataType | System.Type object for the System.String type. |
ProviderType | Set to TdType.VarChar. |
ProviderSpecificDataType | System.Type object for the System.String class. |
The following example shows how to configure a MBR parameter using DbType type declaration and a BCL value. The value is set to a System.String instance.
C# |
Copy Code |
---|---|
TdParameter shapeMBR = new TdParameter(); shapeMBR.ParameterName = "shapeMBR"; shapeMBR.DbType = DbType.String; shapeMBR.Value = "(10, 3, 22, 7)"; |
The following example shows how to configure a MBR parameter using TdType type declaration and a BCL value.
C# |
Copy Code |
---|---|
TdParameter shapeMBR = new TdParameter(); shapeMBR.ParameterName = "shapeMBR"; shapeMBR.TdType = TdType.VarChar; shapeMBR.Value = "(10, 3, 22, 7)"; |
The TdParameter.Value should be set to an Array of Characters (Char[]), String object or an object that supports conversion (Convert.ToString) to System.String.
The TdParameter.Size property must be set to 256 for InputOutput or Output Parameters. The Data Provider will throw an exception when TdParameter.Direction property is set to ParameterDirection.Output or ParameterDirection.InputOutput and TdParameter.Size property is set to Zero. The TdParameter.Size property specifies the maximum number of Unicode Characters (or Bytes) the Data Provider will send to the SQL Engine and/or will receive from the SQL Engine.
![]() |
---|
TdParameter.Size is not required for Input parameters. However it will improve the overall performance of Batch Updates. Therefore the general guideline is to always set the TdParameter.Size property to 256. |
The following methods and properties return the column or parameter value as a System.Char[] object.
The following methods and properties return the column or parameter value as a System.String object.
Accessor Methods for Retrieving Data
Configuring Parameters and Parameter Data Types