Re: Timesheet -> Submit: Add possiblity to not use transactions when submitting the timesheet to a database?
Suggestions
Timesheet -> Submit: Add possiblity to not use transactions when submitting the timesheet to a database?
PatrickMetz
04-06-2008, 8:13
I added a timesheet table to my timesnapper-database
(MySQL 5.51a, InnoDB-tables via MyOleDB 3.96, ConnectionString: Provider=MySQLProv;Location=localhost;Data Source=timesnapper;User Id=timesnapper;Password=timesnapper)
, and successfully inserted data into it under options -> integration -> timesheet integration -> details -> for each timesheet row -> test (I checked the table content afterwards). So far so good. But when I open the timesheet and try to submit the timesheet for real, TimeSnapper crashes:
---------------------------
TimeSnapper Error Report
---------------------------
This is what gets sent to the TimeSnapper team:
System.InvalidOperationException:
The ITransactonLocal interface is not supported by the 'MySQLProv' provider. Local transactions are unavailable with the current provider.
---> System.InvalidCastException: Specified cast is not valid.
at System.Data.OleDb.OleDbConnection.ITransactionLocal()
--- End of inner exception stack trace ---
at System.Data.OleDb.OleDbConnection.ITransactionLocal()
at System.Data.OleDb.OleDbConnection.
BeginTransaction
(IsolationLevel isolationLevel)
at System.Data.OleDb.OleDbConnection.BeginTransaction()
at a1.a(Object A_0, EventArgs A_1)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
---------------------------
OK
---------------------------
Looking at the errormessage I assume that TimeSnapper wouldn't crash if it didn't make use of transactions.
So, if I'm right: would it be possible to add an option that lets the user choose if transactions are used or not when submitting the timesheet?
Best Regards
Patrick Metz
Re: Timesheet -> Submit: Add possiblity to not use transactions when submitting the timesheet to a database?
secretGeek
04-07-2008, 4:36
Ah, that's a nasty problem you ended up with Patrick.
I've altered the program so that it doesn't require transactions if the provider is MySqlProv.
We will contact you when a patch release is made available with this change.
More discussion...
I see that MySql does have transactions, so we can't remove it for all MySqlProviders.
I'd love to know how to programmatically detect if a provider supports transactions. It looks like trying to use them and watching them fail is the only hint you get.
And of course, i know you'd love to be using something other than that provider for connecting to your my sql database. ;-)
kind regards
lb
.: http://secretGeek.net :: dot Nuts about dot Net :.
Re: Timesheet -> Submit: Add possiblity to not use transactions when submitting the timesheet to a database?
PatrickMetz
04-08-2008, 13:39
Thanks a lot!
I'm really looking forward to the patch :-)
Re: Timesheet -> Submit: Add possiblity to not use transactions when submitting the timesheet to a database?
AtliB
04-22-2008, 14:56
This was fixed in version 3.0. See
TimeSnapper 3.0! Major new version.
Best regards
Atli
Check out TimeSnapper, the automatic screenshot journal at
www.timesnapper.com
It runs in the background of your computer, taking screenshots of your desktop every few seconds all week long.
TimeSnapper lets you play back your week just like a movie. Use it to improve your work habits and become more productive.