Welcome to TimeSnapper Forums Sign in | Join | Faq

Print Search
Sort Posts:    
   04-06-2008, 8:13
PatrickMetz is not online. Last active: 4/6/2008 2:18:33 AM PatrickMetz

Top 10 Posts
Joined on 04-05-2008
Posts 10
Geeked [8-|] Timesheet -> Submit: Add possiblity to not use transactions when submitting the timesheet to a database?
Reply Quote
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

   Report 
   04-07-2008, 4:36
secretGeek is not online. Last active: 5/2/2008 7:53:54 PM secretGeek



Top 10 Posts
Joined on 05-30-2006
Brisbane
Posts 18
Cool [H] Re: Timesheet -> Submit: Add possiblity to not use transactions when submitting the timesheet to a database?
Reply Quote
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 :.
   Report 
   04-08-2008, 13:39
PatrickMetz is not online. Last active: 4/6/2008 2:18:33 AM PatrickMetz

Top 10 Posts
Joined on 04-05-2008
Posts 10
Party!!! [<:o)] Re: Timesheet -> Submit: Add possiblity to not use transactions when submitting the timesheet to a database?
Reply Quote
Thanks a lot!
I'm really looking forward to the patch :-)


   Report 
   04-22-2008, 14:56
AtliB is not online. Last active: 6/14/2008 7:53:46 AM AtliB

Top 10 Posts
Joined on 05-30-2006
Reykjavik / Iceland
Posts 259
Re: Timesheet -> Submit: Add possiblity to not use transactions when submitting the timesheet to a database?
Reply Quote
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.
   Report 
TimeSnapper For... » TimeSnapper » Suggestions » Re: Timesheet -> Submit: Add possiblity to not use transactions when submitting the timesheet to a database?

Powered by Community Server, by Telligent Systems