469,636 Members | 1,619 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,636 developers. It's quick & easy.

Problem parsing dates in .xsd


I created an OleDbDataAdapter with the wizard in Visual Studio 2003.
It created a dataset, connectionstring etc. for me to work with. It
also created a .xsd file where one of the columns type is set to date.
My program is being used in many different countries, and many
different local settings. Some time ago a user from Turkey contacted
me saying my program crashed on his system with the following error
code:

System.ArgumentException: The string was not recognized as a valid
DateTime. There is a unknown word starting at index 0.Couldn't store
<Ekim 2006in Date By Month Column. Expected type is DateTime.

I checked and double checked my code, but couldn't find what was
causing this error. I installed my program on a Turkish friend's
computer and it ran just fine. As a final effort, I changed the
columns type from date to string, handled the parsing of dates myself
in code, and the error was gone.

Could someone please explain why the parsing in my code works, but not
in the .xsd file? And what is the preferred method to use here. I'm
feeling a bit reluctant in changing code that works just fine for 99%
of my users to accomodate just this one.

Oct 24 '06 #1
0 1011

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by Gerrit Holl | last post: by
1 post views Thread by Daniel M. Drucker | last post: by
9 posts views Thread by Thomas W | last post: by
7 posts views Thread by Fred Flintstone | last post: by
1 post views Thread by yk | last post: by
12 posts views Thread by Assimalyst | last post: by
1 post views Thread by Malcolm Greene | last post: by
reply views Thread by taa | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.