comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: idl - Mysql interface
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: idl - Mysql interface [message #51668 is a reply to message #51398] Wed, 29 November 2006 16:29 Go to previous message
Brian Larsen is currently offline  Brian Larsen
Messages: 270
Registered: June 2006
Senior Member
Good Stuff, I will look into Marc Buie's library, also searching the
forum (which I should have done a better job of first) yielded maybe
the easiest solution which I have made work which is simply using spawn
(which is certainly far from elegant but does work)

As an example that wrote using help from earlier posts:

make a file called 'script.sql' -- can of course be any name
that has the query you want to perform

use simfile; select count(*) from header;

you can pre create these which is not too useful or your idl program
could create them.

then run this idl:
idl> ans=''
idl> spawn, 'mysql --password="password" < script.sql', ans
idl> PRINT, ans
count(*) 1004
idl> help, ans
ANS STRING = Array[2]

Which gets the job done.

- Brian



------------------------------------------------------------ ---------------
Brian A. Larsen
Dept. of Physics
Space Science and Engineering Lab (SSEL)
Montana State University - Bozeman
Bozeman, MT 59717
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: "free" screen size
Next Topic: Re: Martin Shultz's MSG_GUI

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 15:55:20 PDT 2025

Total time taken to generate the page: 0.40415 seconds