1

Does anyone know how to connect to an ODBC database in Octave? The database package doesn't seem to install properly. I found this bug here:

http://savannah.gnu.org/bugs/?30090

Is there any other method? I am actually trying to connect to SQL Server and am using Windows 7 (not linux unfortunately, at my work place!).

If not, are there any other matlab type programming environments out there that anyone would recommend?

3 Answers 3

2

A looong time ago I wrote a connector for Octave to PostgreSQL (which is still on its webpage here). Maybe you could use that a starting point?

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for the link. Unfortunately I don't have the time to go and write my own connector. Seems pretty basic functionality, but I guess this is what using an open source free alternative is about that doesn't have a massive following. I think I'm just going to export the data to a CSV then import that way into Octave.
1

Taken from a reply by Martin Helm to the same question on the Octave forum which suggests using Java plus JDBC. -

Look at the java bindings in the octave java package (octave-forge), it is maintained and it works. Java is very strong and easy for database handling. Use that and jdbc driver for mysql to connect to mysql (or with the appropriate jdbc driver everything else which you can imagine). That is what I do when using db queries from octave. Much easier and less indirect than invoking scripts and parsing output from databse queries.

As far as I remeber the database package is somehow broken (at least I never was able to use it).

I also have this problem and will be giving this a try.

Comments

0

As an update for 2024, there is now also a octave-odbc package https://gnu-octave.github.io/octave-odbc/ that supports similar functionalty as provided in the matlab toolkit.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.