Link to home
Start Free TrialLog in
Avatar of brianon
brianon

asked on

bcp return code?

OK. So I've got a problem.....

I've written a C app that bcps files into tables in a SYBASE Database. I'm working with Solaris OS(Unix).

The problem is that if the bcp does not work my app does not know of the bcp failure !
The files get backed up and the information has to be manually retrieved.

If the bcp problem is about the file i.e. incorrect fields then my bcp operation creates a bcp error file which I check for and can then NOT backup the files etc...

However, the BIG problem is that should the bcp operation fail for another reason, say...the BULKCOPY option was not set to TRUE in the database then although an error message is displayed on screen, no error file is created and therefore my app thinks everything wen't fine and backs up the file :(

Is it possible to get return codes from bcp when I am calling it like so ..

system("bcp .....");

Any ideas?

Cheers,
Brian.
ASKER CERTIFIED SOLUTION
Avatar of amitpagarwal
amitpagarwal
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial