+3  A: 

This is a perfectly fine way to access an external database, as long as your needs are simple. If you already know about the performance and memory implications of doing this, then there's not much more to say.

Greg Hewgill
+1  A: 

I wouldn't recommend this if your calling code is running setuid or setgid, but in that case you could use one of the exec() functions instead. (There are a few other considerations you may wish to take into account, all detailed in man 3 system.)

Meredith L. Patterson
OP is on Windows...
derobert
@Patterson:Sorry .. the question was not quoting the environment before. The last line in the question is edit after seeing your answer.Thanks for your time
Enjoy coding
Whoops, didn't know you were on Windows when I posted. Unfortunately I don't know much about the low-level Windows system calls, but presumably the docs will point out what considerations to take into account. Good luck!
Meredith L. Patterson
+1  A: 

The method is fine: it's great to decouple the db subsystem and the parser subsystem by implementing them in an appropriate language.

There's just this tiny little thing - but I may be mistaken because I'm not familiar with bteq: the program will need a bteq script installed in the execution folder; this script will contain username and password. If those aren't encripted in some way, there might be a security flaw.

xtofl
yep. That is ... but its ok for my local use (on my system). Yeah I need to look at this . Thanks for the suggestion.
Enjoy coding