-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Problem with 1.2 DateTime SQL format on french system
PostPosted: Fri Jul 13, 2007 6:53 am 
Newbie

Joined: Fri Jul 13, 2007 6:25 am
Posts: 1
Location: France, Antony(92)
I'm french and on french systems.

That mean my SQL Server 2000 Database has a french collation but i don't know if it's important to NHibernate.
My System is french to and i think that's why i have this problem of formatting DateTime Sql parameters :

On a save, NHibernate send this to SQL Server :

Code:
exec sp_executesql N'INSERT INTO ticket ( ....,  tick_date_create, ......) VALUES(....... @p5 ......); select SCOPE_IDENTITY()'
N' ........ @p5 datetime ........', ........., @p5 = 'juil 13 2007 11:35:02:000A' ........


Note that i've no problem with a 3 letters month, for example i have no problem to save a date value in december.

In july NHibernate send :
'juil 13 2007 11:35:02:000A' (the M is missing)
For december it's :
'déc 13 2007 11:35:52:000AM'

I think there's a bug somewhere about formatting datetime parameter in other languages than US but i don't know how to change it (IDialect ? IDriver ??)

Of course i tried first to change the "Thread.CurrentThread.CurrentCulture" or "Thread.CurrentThread.CurrentUICulture" to "en-US" or
CultureInfo.InvariantCulture but nothing works the formatting is still the same.


Anyone have an idea ?
(NHibernate code is a little hard for me, and i badly think i can be old before solving my problem without help :s)


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.