Re: Task-Lookup: Connect TimeSnapper to MySQL via ODBC?

Help Needed

Task-Lookup: Connect TimeSnapper to MySQL via ODBC?


Anonymous 03-23-2008, 5:59
Hello,

Is it possible to have TimeSnapper connect to an ODBC-datasource?
I'd really be happy to be able to let TimeSnapper connect to my ODBC-datasources, which provide access to my MySQL-Databases.

Best Regards
Patrick Metz




Re: Task-Lookup: Connect TimeSnapper to MySQL via ODBC?


Anonymous 03-23-2008, 8:14
Well, never mind :-)

I've got TimeSnapper working together with MySQL 5.0.51a , at least with OLE DB.

I simply installed MyOleDB: http://sourceforge.net/project/showfiles.php?group_id=148466
And used this ConnectionString:
Provider=MySQLProv;Location=localhost;Data Source=myDatabase;User Id=myUsername;Password=myPassword;

But I defined that database as an ODBC-Source too, so I can edit the datatables with OpenOffice.
That is one heck of a detour for conveniently using tasks in TimeSnapper,... but now I can finally buy your Software ;-)

So long!
Patrick Metz

Re: Task-Lookup: Connect TimeSnapper to MySQL via ODBC?


AtliB 03-23-2008, 10:08
Hey Patrick,

good job on solving this! Below are some alternative methods for connecting to MySQL

As you've noticed, TimeSnapper uses OleDB to connect to a database.  OleDB also supports connecting directly to an ODBC data source:
http://connectionstrings.com/default.aspx?carrier=dsn

and here are connection string samples for mysql / MyODBC:
http://connectionstrings.com/default.aspx?carrier=mysql

We are looking for ways to smooth this process :)

Thanks!
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.

Re: Task-Lookup: Connect TimeSnapper to MySQL via ODBC?


PatrickMetz 04-05-2008, 4:30
Hmm... i played around with the connectionstrings you gave me, but I can't establish a direct connection to ODBC via OleDB.
Could you tell me what the correct connectionstring for TimeSnapper is for these settings, please:

ODBC-Driver: MySQL ODBC 3.51
ODBC-Source: timesnapper
host: localhost

Best Regards
Patrick Metz

Re: Task-Lookup: Connect TimeSnapper to MySQL via ODBC?


AtliB 04-05-2008, 15:43
Hi Patrick,

I'm not able to test this but I'd expect this should work:
DSN
=TimeSnapper;Uid=myUsername;Pwd=mypassword;

or this one:
Driver={MySQL ODBC 3.51 Driver};Server=localhost;Database=myDataBase; User=myUsername;Password=myPassword;Option=3;

If that doesn't work, I recommend you just keep on using your current working solution!

Thanks
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.

Re: Task-Lookup: Connect TimeSnapper to MySQL via ODBC?


PatrickMetz 04-06-2008, 4:11
Thanks a lot for your help. But still no luck. I tried both strings, but each one produced the same error:

---------------------------
TimeSnapper - Test Lookup Query
---------------------------
There was a problem performing the lookup.



Details:

System.ArgumentException: An OLE DB Provider was not specified in the ConnectionString.  An example would be, 'Provider=SQLOLEDB;'.

   at System.Data.OleDb.OleDbConnectionString.ValidateParse()

   at System.Data.Common.DBConnectionString..ctor(String connectionString, UdlSupport checkForUdl)

   at System.Data.OleDb.OleDbConnectionString.ParseString(String connectionString)

   at System.Data.OleDb.OleDbConnection.set_ConnectionString(String value)

   at System.Data.OleDb.OleDbConnection..ctor(String connectionString)

   at m.a(h A_0, Flag A_1)

   at s.e(Object A_0, EventArgs A_1)



Query:

SELECT customer FROM customers
---------------------------
OK  
---------------------------




And when I try Provider=SQLOLEDB;DSN=timesnapper;Uid=timesnapper;Pwd=timesnapper; this error is produced:
(Translated to English: SQL Server doesn't exist or access denied. Invalid attribute for connectionstring.)



---------------------------
TimeSnapper - Test Lookup Query
---------------------------
There was a problem performing the lookup.

Details:

System.Data.OleDb.OleDbException: [DBNETLIB][ConnectionOpen (Connect()).]SQL Server existiert nicht oder Zugriff verweigert.

Ungültiges Attribut für die Verbindungszeichenfolge


   at System.Data.OleDb.OleDbConnection.ProcessResults(Int32 hr)

   at System.Data.OleDb.OleDbConnection.InitializeProvider()

   at System.Data.OleDb.OleDbConnection.Open()

   at System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState)

   at System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)

   at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)

   at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)

   at m.a(h A_0, Flag A_1)

   at s.e(Object A_0, EventArgs A_1)



Query:

SELECT customer FROM customers
---------------------------
OK  
---------------------------




And Provider=SQLOLEDB;Driver={MySQL ODBC 3.51 Driver};Server=localhost;Database=timesnapper;User=timesnapper;Password=timesnapper;Option=3;
produces this:
(Translated to English: Invalid authorization specification. Invalid attribute for connectionstring.)



---------------------------
TimeSnapper - Test Lookup Query
---------------------------
There was a problem performing the lookup.



Details:

System.Data.OleDb.OleDbException: Ungültige Autorisierungsangabe

Ungültiges Attribut für die Verbindungszeichenfolge


   at System.Data.OleDb.OleDbConnection.ProcessResults(Int32 hr)

   at System.Data.OleDb.OleDbConnection.InitializeProvider()

   at System.Data.OleDb.OleDbConnection.Open()

   at System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState)

   at System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)

   at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)

   at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)

   at m.a(h A_0, Flag A_1)

   at s.e(Object A_0, EventArgs A_1)



Query:

SELECT customer FROM customers
---------------------------
OK  
---------------------------




I suppose I need to tweak the syntax or specification of the login credentials a little more, but I really don't know how.
Well I'm gonna stay with my solution for now. But, if someone reads this post and knows how to get it working: your help would be much appreciated!!!

Re: Task-Lookup: Connect TimeSnapper to MySQL via ODBC?


secretGeek 04-06-2008, 4:27
Hi Patrick

Yes you'll definitely need a different "provider" -- the one "SQLOLEDB" means "Microsoft Sql Server to OLE db"


I've just been looking at the great website "ConnectionStrings.com" to see how they recommend connecting to mySql from a .net application -- see this page
http://www.connectionstrings.com/?carrier=mysql

They say:
"Provider=MySQLProv;Data Source=mydb;User Id=myUsername;Password=myPassword;"

so i think instead of "SQLOLEDB" you'll need "MySQLProv"...

Please try that and get back to us!

best of luck
lb

.: http://secretGeek.net :: dot Nuts about dot Net :.

Re: Task-Lookup: Connect TimeSnapper to MySQL via ODBC?


PatrickMetz 04-06-2008, 5:38
Thanks a lot for your help, but as stated above: I already got it working this way.
 Anonymous wrote:
Well, never mind :-)

I've got TimeSnapper working together with MySQL 5.0.51a , at least with OLE DB.

I simply installed MyOleDB: http://sourceforge.net/project/showfiles.php?group_id=148466
And used this ConnectionString:
Provider=MySQLProv;Location=localhost;Data Source=myDatabase;User Id=myUsername;Password=myPassword;

But I defined that database as an ODBC-Source too, so I can edit the datatables with OpenOffice.
That is one heck of a detour for conveniently using tasks in TimeSnapper,... but now I can finally buy your Software ;-)

So long!
Patrick Metz



What I'd like to achieve is the direct usage of my ODBC-Source without the outdated MyOleDB that is used when I specify MySQLProv.

 AtliB wrote:

OleDB also supports connecting directly to an ODBC data source


But that's mostly based on my personal preference. I've got a working solution - albeit clunky :-)

Powered by Community Server, by Telligent Systems