SQL

For discussing the use of databases from Igor.
Hi,

we (www.fzk.de/anka) would be interested to have access to a rather big SQL-database via IgorPro. At the moment, this is done by Excel, which is rather annoying to handle rather large data sets by Excel. It is - a nice to have - not a very important demand.

Stefan
There are some errors in the initial release of SQL XOP (SQL_XOP_100B01.zip).

First, the ReadMe tells alpha testers to remove SQLConstants.ipf and SQLUtilities.ipf from "WaveMetrics Procedures\File Input Output" In fact, everyone should remove these files if they have them. New versions of the files (from the SQL_XOP_100B01.zip archive) are to be stored in "WaveMetrics Procedures\Utilities", as the ReadMe says.

Second, there are unneeded symbolic paths in the two demo experiments, "SQL Demo.ipf" and "SQL Low-Level Demo.ipf". If you get errors when opening these demo experiments, just skip the missing symbolic paths.

These errors will be fixed in the next release.

Being interested in the potential of SQL to administer growing collections of data files, yet being totally new to SQL itself, might I ask in this forum ...

1) Does the SQL XOP support SQLite databases?

2) Can folks recommend a companion SQL(Lite) client that is preferrably a) well-established (stable), b) cross-platform (Mac + Win), d) GUI based, and e) free?

---
To which I add my own response ...

Mike T's SQLite Database Maintenance Application
This allows you to create a database, get data into it, and query it, however it does not allow you to change the structure of a table in a database.

SQLite Database Browser
This allows you to do the same as above and also change the structure of tables in a database, however its interface is a bit more encumbered IMO.
---

Thanks!

--
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAH
>1) Does the SQL XOP support SQLite databases?

SQL XOP will work with any database for which an functional ODBC driver is installed. I don't know if SQLite has an ODBC driver.

Here is an answer I gave to a customer about Macintosh MyODBC drivers for use with SQL XOP.

>However, I cannot use your recommended ODBC driver
>from http://dev.mysql.com/downloads/connector/odbc/5.1.html
>
>The problem is I am running a G5 mac with os 10.5.  The only odbc driver
>available at the mysql.com website is for 10.5 ix for x86 processors.

The link in the SQL Help file is:

http://dev.mysql.com/downloads/connector/odbc/

That link used to lead to MyODBC 3.51 at:

http://dev.mysql.com/downloads/connector/odbc/3.51.html

I guess they switched the link I used to point to MyODBC 5.1 which is new.

I have been using MyODBC 3.51.19 and have never tried 5.1. I know another customer has successfully used 5.1 but I had to make a change in the demo experiment (see next post).

However, the 3.51 driver is also not available for PPC/10.5.

However^2, I think you can use the PowerPC 10.4 ODBC driver on 10.5. In fact, I just tried it and it worked. I installed the 10.4 - 5.1 driver on a PowerPC running 10.5 and it worked. I think the 10.4 - 3.51 driver would also work. So that should be your ticket. I will make a note in the help file about this.


If you have installed MyODBC 5.1 then the originally-provided SQL Demo experiment for SQL XOP will not work because your MyODBC driver's name will not be "MySQL ODBC 3.51 Driver" as expected.

To work around the problem, open the SQL Demo experiment and open the procedure window. Go into the GetWMDemoConnectionString function in Igor and change the Windows part from:

String connectionStr = "DRIVER={MySQL ODBC 3.51 Driver};. . ."

to
// String connectionStr = "DRIVER={MySQL ODBC 3.51 Driver};. . ."
String connectionStr = "DSN=IgorDemo1;UID=DemoUser;PWD=Demo"

Does anyone have experience converting a .mdb file to an SQL database? Is there a way to do this via an XOP to get files ready for import with the existing procedures?

Quote:
Does anyone have experience converting a .mdb file to an SQL database? Is there a way to do this via an XOP to get files ready for import with the existing procedures?


I believe that you don't need to convert .mdb to use from Igor's SQL XOP. You just need to activate the "MS Access Database" ODBC driver using the ODBC Data Source Administrator on Windows.

If you are on Macintosh, you can get an ODBC driver here: http://www.actualtech.com/product_access.php