#4 mdb-sql as a coprocess

open
nobody
None
5
2004-12-01
2004-12-01
paaguti
No

I'm making heavy use of mdb-sql because I have to work
with
Access files produced by other people. But at the end
of the
day, I have a limited number of reports to generate from
them. To generate these reports, I'm using TCC as my
scripting language. As a result, I write the programs
generating my reports in C. One of the things I really
missed
was the possibility of running mdb-sql as a coprocess and
simulating user interaction from the C programs, like

fprintf(tosqlpipe,"select * from table\ngo\n");

and then read the output from mdb-sql via fgets(...). The
programs would consistently halt at the fgets, because no
input was available. Attached is a patch, which
includes the
necessary fflush() 's in mdb-sql, to make this interaction
possible.

The patch is generated on version 0.5, because 0.6pre1
doesn't work on the mdb files I work with.

Discussion

  • paaguti
    paaguti
    2004-12-01

    Patch on 0.5 implementing this feature and solving minor issues on 0.5 which are addressed in 0.6pre1

     
    Attachments