Send feedback on this topic.
Teradata.Client.Provider
Use Large Decimal in Typed DataSet
.NET Data Provider for Teradata > Developer's Guide > Visual Studio Integration Overview > Use Large Decimal in Typed DataSet

The DataSet Designer utilizes primitive .NET Data Types (e.g. System.Int32 and System.Decimal) by default. It maps Teradata Decimal Data Type to System.Decimal. System.Decimal has a maximum Precision of 29 and maximum Scale of 28. This default mapping cannot handle Teradata Decimal with precision greater than 29 or Scale greater than 28.

TdDecimal is a provider specific type with maximum precision and scale of 38. DbDataAdapter.ReturnProviderSpecificTypes property controls the Fill and FillSchema methods. This property by default is set to false per ADO.NET specification. It can be set to true to create DataColumns of type TdDecimal.

How to Generate a Typed DataSet with TdDecimal Type DataColumns

How to Fill a Typed DataSet

The Typed DataSet generated in steps above will not have a TableAdapter. However you can use TdDataAdapter.Fill method on an instance of the Typed DataSet.

C#
Copy Code
private void Form1_Load(object sender, EventArgs e)
{
    tdDataAdapter1.Fill(this.largeDecimalDataSet1);
}

How to Save Updates to a Typed DataSet

The Typed DataSet generated in steps above will not have a TableAdapter.  However you can use TdDataAdapter.Update method on an instance of the Typed DataSet.

C#
Copy Code
private void largeDecimalBindingNavigatorSaveItem_Click(object sender, EventArgs e)
{
    tdDataAdapter1.Update(this.largeDecimalDataSet1);
}