When running a select query containing DateTime in other cultures, exception is thrown

Description

When parameters of IDBCommand contains date values and application is running in a culture with non-standard date values (string representation of date value contain culture specific AM / PM designator like ب.ض and ق.ض) Jet engine can not accept it as a valid date value.

The problem is that in JetDbCommand, parameters of type DateTime are specifically converted to string (NHibernate.JetDriver.JetDbCommand.CheckParameters line 89) using ToString("yyyy/MM/dd HH:mm:ss") method, but without specifying the Invariant Culture.

Attached patch contains the bug fix and accompanying unit test.

Environment

None

Attachments

1

Activity

Show:
Fixed

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Priority

Who's Looking?

Open Who's Looking?
Created May 21, 2009 at 1:33 AM
Updated June 1, 2009 at 1:35 AM
Resolved June 1, 2009 at 1:35 AM
Who's Looking?