[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Octave and databases

From: CdeMills
Subject: Re: Octave and databases
Date: Wed, 1 Sep 2010 02:57:57 -0700 (PDT)

Pohlen, Timo wrote:
> Dear Ladies and Gentlemen,
> I tried to connect Octave to a MySQL database - but all efforts were in
> vain. In spite of looking through manuals and tutorials on the internet,
> it was not possible to establish a connection that worked. In several
> forums I found comments that the database connectivity of Octave is not
> perfect. My question is: Is it possible at all to connect Octave to a
> MySQL database (or another database)? And if so, who can I establish a
> connection and retrieve data?

I looked in my archives and found a script I used a few years ago.

Octave code:

select_stmt = "select distinct(Run) from Measurements where Animal=%d";
perl_sql = strcat("perl ./octave_sql_pipe ",dbname," ",dbuser," ",dbpw ,
list_Id = popen(perl_sql, "r");
Runs = fscanf(list_Id,"%d");

You construct the query, you execute externally by running perl, and you get
back the result. Perl code included, the result is faster if you compile it.



View this message in context:
Sent from the Octave - General mailing list archive at

reply via email to

[Prev in Thread] Current Thread [Next in Thread]