The designer display of the tables enables primary keys to be selected (right clicking the column and selecting Set logical primary key) and foreign key relationships to be identified by dragging the foreign key columns from the child table to the parent table on the designer pane. Setting the primary keys and the foreign keys must be performed prior to the third step of generating a metadata cube.
Utilizing the wizard and selecting Use Existing Stored Procedures contains options to map parameters in insert, update or delete commands to source columns. These commands, once selected from the drop down list will display a list of parameters with a drop down list of Source Columns. The Source Columns will not contain any available columns, as the Teradata stored procedure does not return schema information on dynamic result sets.
After selecting the Select and Insert and/or Update and/or Delete commands, select Next and select OK on the dialog box warning of missing parameter bindings. The generated Microsoft Windows Form Designer application code will contain parameter information for the stored procedure output parameters. The parameter information must be edited to reflect the correct values. One value that will be incorrectly generated is the size value. For example, the size below is generated incorrectly.
tdParameter1.Direction = System.Data.ParameterDirection.InputOutput; tdParameter1.Offset = 0; tdParameter1.ParameterName = "p1DecInOut"; tdParameter1.Precision = ((byte) (18)); tdParameter1.Scale = ((byte) (2)); tdParameter1.Size = 2147483647; tdParameter1.TdType = Teradata.Client.Provider.TdType.Decimal;
The second limitation of the TdDataAdapter concerns setting the UpdateBatchSize property. This property enables changes to the DataTable to be cached and send to the Advanced SQL Engine as a multi-statement query. Due to a limitation in the UpdatedRowSource property of the TdDataAdapter's InsertCommand, UpdateCommand and DeleteCommand, the UpdateBatchSize is only supported as a batch size of 1. Microsoft Visual Studio limits the UpdatedRowSource values to None or OutputParameters for batch updates. OutputParameters UpdatedRowSource property is not supported in our Provider.
The UpdateBatchSize may be set to a value > 1 if the application does not require updates to be reflected in the DataTable. For example, auto-generated key retrieval is now supported which updates the identity column value in the DataTable from a Teradata generated column during insert, insert-select or multi-statement insert statement types. The updated identity column is supported only while utilizing TdDataAdapter UpdateBatchSize = 1. If the application does not require updated values in the DataTable, a workaround is available. Configuration of the TdDataAdapter within Visual Studio will by default set the UpdatedRowSource to Both. Setting this value to None will enable the Visual Studio Windows application to execute without error, but this disables any updates to the DataTable.