Added transaction handling and corrected DateTime quoting format string for Jet #320

Closed
wants to merge 4 commits into from

3 participants

@dabide

Added transaction handling to Jet (the mdb file was locked after running the migrations the way it was, because the connection was never closed). Also added a finally { ... } clause to MigrationRunner to ensure closing of the connection, because VersionLoader.LoadVersionInfo() reopens it after the transaction has been committed.

JetQuoter.cs contained a wrong format string for DateTime, resulting in the insert into VersionInfo failing. Has this ever worked? Probably noone uses Access. Good for them! :-)

@daniellee
Collaborator

Thanks for having a look at the Jet code. I suppose I'd better starting testing Jet :-) At the moment I test everything except Oracle, Jet and Sql Server 2000. Are any of the other core committers testing Jet?

@tommarien
Collaborator

This seems like a non obtrusive pull, the only thing I don't like is the sealed change you did for the processor, @dabide you mind correcting this ? The last commit seems the most changing one, mmm, need to investigate ...

@dabide

The reason I made it sealed, is that it now contains a call to a virtual method in the constructor. That is probably the reason that SqlServerProcessor and SqlServer2000Processor also are sealed. Probably, it would be better only to seal the BeginTransaction method. What do you think?
http://stackoverflow.com/questions/119506/virtual-member-call-in-a-constructor

@tommarien
Collaborator

@dabide in fact now that you mention it the processorbase begintransaction should be abstract etc, but in this case you can ignore the warning, or just keep it sealed like you did.

@tommarien
Collaborator

@dabide there are some tests that fail, see IfDatabaseExpressionRootTests, you mind fixing those ?

@dabide

Closing this pull request. Added a newer, much simpler one.

@dabide dabide closed this Feb 18, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment