Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

making system calls from c++ Urgent!!!

Status
Not open for further replies.

priyar12

Programmer
Nov 21, 2001
1
US
Hi,
I want to invoke sql loader program from c++.I also want to get the result of sql loader whether it failed or succeded.
How do i get the return value if I use the system command to invoke sql loader..
priya
 
You can't. System call returns to you its shell execution return value, not command execution (it execs a shell to execute your command). The only think you could do is reading and parsing standard output to see the result.
Alternatively, you could execute sqlloader using exec call, and collect its return value with a wait call. I think this is the easiest approach.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top