What Collation is for best for handling date Internationally?
-
My app runs perfectly with MSSQL Server in client/server architecture when my computer is in US culture. But I experience problem when I switched my computer to UK culture. My investigation revealed that it is the date fields in the test data which I created earlier in US culture that is creating the problem My MSSQL Server collation is Latin1_General_CS_AI. I want my app to allow for culture transparency at least for US and UK.
-
My app runs perfectly with MSSQL Server in client/server architecture when my computer is in US culture. But I experience problem when I switched my computer to UK culture. My investigation revealed that it is the date fields in the test data which I created earlier in US culture that is creating the problem My MSSQL Server collation is Latin1_General_CS_AI. I want my app to allow for culture transparency at least for US and UK.
It is to be hoped that you are storing dates as DATE or DATETIME, not as strings, so that should not be a problem. If you are storing dates as string, I strongly reccommend you refactor and do it the right way.
-
It is to be hoped that you are storing dates as DATE or DATETIME, not as strings, so that should not be a problem. If you are storing dates as string, I strongly reccommend you refactor and do it the right way.
Thanks for the reply. Yes I am storing data as DATE.
-
Thanks for the reply. Yes I am storing data as DATE.
The at some point your a converting your test data from string to date and falling in a hole. That is where you need to deal with the format. Collation is not going to help you.
Never underestimate the power of human stupidity RAH
-
My app runs perfectly with MSSQL Server in client/server architecture when my computer is in US culture. But I experience problem when I switched my computer to UK culture. My investigation revealed that it is the date fields in the test data which I created earlier in US culture that is creating the problem My MSSQL Server collation is Latin1_General_CS_AI. I want my app to allow for culture transparency at least for US and UK.
As stated collation is not the problem. Look at SET DATEFORMAT and see if it will help. Hint you can set it for the process.
-
As stated collation is not the problem. Look at SET DATEFORMAT and see if it will help. Hint you can set it for the process.
I have rechecked and have realised that problem emanate from crystal report. I have crystal report based report that uses Store Procedure with parameters(that includes date) as its datasource. I realised that when computer is on US culture , the report displays but when I try to display the report in UK culture it raises exception. I used the same Store Procedure for DataGridView in both cultures (ie US and UK) and it worked with same parameters that did not work in crystal report.
-
I have rechecked and have realised that problem emanate from crystal report. I have crystal report based report that uses Store Procedure with parameters(that includes date) as its datasource. I realised that when computer is on US culture , the report displays but when I try to display the report in UK culture it raises exception. I used the same Store Procedure for DataGridView in both cultures (ie US and UK) and it worked with same parameters that did not work in crystal report.
You might have to ask in a Crystal Reports forum.
-
I have rechecked and have realised that problem emanate from crystal report. I have crystal report based report that uses Store Procedure with parameters(that includes date) as its datasource. I realised that when computer is on US culture , the report displays but when I try to display the report in UK culture it raises exception. I used the same Store Procedure for DataGridView in both cultures (ie US and UK) and it worked with same parameters that did not work in crystal report.
noblepaulaziz wrote:
but when I try to display the report in UK culture it raises exception.
What's that? You most of people don't include that in your question, don't know why? :sigh:
thatraja
Code converters | Education Needed No thanks, I am all stocked up. - Luc Pattyn When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is - Henry Minute
-
You might have to ask in a Crystal Reports forum.
thanks for suggestion djj55. I appreciate your assistance
-
thanks for suggestion djj55. I appreciate your assistance
Sorry I could not be of more help.