API/CodeSamples/Changing-Hard-coded-Data-Precision.md
... ...
@@ -0,0 +1,26 @@
1
+#Changing Hard-coded Data Precision
2
+
3
+##About
4
+
5
+Below is the code sample to change the hard-coded Decimal Type Precision from DECIMAL(18,6) to NUMERIC(22,8)
6
+
7
+
8
+## c#
9
+
10
+Ex) DECIMAL(18,6) to NUMERIC(22,8)
11
+```c#
12
+List<KeyValuePair<string, string>> typeOverrides = AdHocContext.Driver.NativeTypesOverrides;
13
+for (int i = 0; i < typeOverrides.Count; i++)
14
+ if (typeOverrides[i].Key == "Decimal")
15
+ {
16
+ typeOverrides[i] = new KeyValuePair<string, string>(typeOverrides[i].Key, "NUMERIC(22,8)");
17
+ break;
18
+ }
19
+AdHocContext.Driver.NativeTypesOverrides = typeOverrides;
20
+
21
+```
22
+
23
+
24
+
25
+
26
+