JetDbCommand is just a wrapper class for OleDbCommand with special handling of datatypes needed when storing
data into the Access database.
These type conversion are performed in command parameters:
1) DateTime, Time and Date parameters are converted to string using 'dd-MMM-yyyy HH:mm:ss' format.
2) Int64 parameter is converted to Int32, possibly throwing an exception.
Because of the diference between the way how NHibernate defines identity columns and how Access does, I have to
incorporate another dirty hack here. Because NHibernate does not always use its driver to generate commands
(ie. in Schema creation classes), this functionality has to be moved "down" to the IDbCommand object.
IMO, everything in NHibernate should call db queries using its drivers, but at the present time it is not true.
If it was, we could move the replacing functionality up to the driver class, where it's more appropriate, although it
is still a dirty hack :)
Namespace: NHibernate.JetDriver
Author: Lukas Krejci
Assembly: NHibernate.JetDriver (in NHibernate.JetDriver)
Version: 1.2.0.4000
Syntax
| Visual Basic (Declaration) |
|---|
Public NotInheritable Class JetDbCommand _ Implements IDbCommand, IDisposable |
| C# |
|---|
public sealed class JetDbCommand : IDbCommand, IDisposable |
| Visual C++ |
|---|
public ref class JetDbCommand sealed : IDbCommand, IDisposable |