So I found the problem. It was a caused by an empty DateTime field that was accepted by Firebird (it allows dates to be 1/1/1), but rejected by SqlServer (1/1/1 < 1/1/1753 which is minValue of SqlDateTime). Since the original author of the code did not catch his exceptions in his DAO object, but only in his presentation layer, he missed the session.Close() statement. Hence on the second attempt, the exception "Illegal attempt to associate with 2 sessions" was correctly thrown by NHibernate... (found clue to the solution for this on another thread in this forum...)
|