I built a small query tool for Oracle with CSV export function with an OracleDataAdapter to fill a dataset that is displayed in a DataGrid (WinForms). At first I used .NET types (DateTime, decimal, string,...) but I got overflow exceptions in some cases because of larger precision in Oracle (NUMBER(30,10)
). Therefore I had to set the property ReturnProviderSpecificTypes = true
in the OracleDataAdapter so now it uses OracleClient (OracleNumber, OracleBoolean, OracleString,...) types instead.
The problem is everything is always localized (on screen and during CSV output) to en-US formats while I'm in nl-BE region (we use comma as decimal separator and point as thousand separator). The column separator in CSV is semicolon btw, so there's no interference with the comma in decimal numbers.
So is there a way to override the ToString method in a way for those types? Some sort of injecting a formatting engine?
Thanks