Forum Discussion
Thank you for censoring it Jack, it was a copy-paste from support ticket, I forgot to delete that.
I was searching how to change the connection string to add there a localization but was not successful. Could you please provide a link where this parameter of connection string is described?
- JackLacava3 years agoHonored Contributor
So, if you're executing that SQL in a Connector, you must be opening a database connection somewhere; I assume you are using the standard Onestream facilities for this, rather than custom stuff. In order to connect with that, you have to specify the connection details, which is done with a string of key=value parameters:
- If you are using CreateCustomExternalDbConnInfo, you specify the connection string as a parameter in that call
- If you are using CreateExternalDbConnInfo or CreateDbConnInfo, the connection string has been specified in the OneStream Application Server Settings using the related utility (described in the Installation guide, search for "Defining Database Connections Manually"). To build the initial string, you can leverage the OneStream Database Configuration utility, which has a wizard to connect to databases and allows you to generate a connection string.
The actual parameters you can pass in that string should be the ones described at this link , which include a Language option and a Regional switch that I think could influence things.
To be honest, I wouldn't mess with all this. If the explicit conversion in sql works, just keep using that; if you are pulling those numbers from a DataTable object to convert to strings, just call .ToString on them with culture-specific parameters to get what you want, e.g. myDecimal.ToString("N3", CultureInfo.InvariantCulture) will always give you "1,234.123" (because InvariantCulture is based on US-English - if you want something else you can use CultureInfo.getCultureInfo("some culture") instead of CultureInfo.InvariantCulture). See Decimal.ToString for more details.
This is all generic advice, to be more precise we would have to see the actual connector code that executes that statement, and maybe what happens when you change things.
- pavel-wbr3 years agoNew Contributor II
Hi Jack, do you have any news to my problem?
Thanks,Pavel
Related Content
- 6 months ago
- 6 months ago
- 7 months ago
- 2 years ago