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)