Okay, let me explain the situation more clearly. It seems we have a mix up, my fault.

Okay, we have an external program; let's call it ProgramA which will pass a few arguments into my VB exe;let's call it MyVBexe. AFter MyVBexe is done processing, it will pass back a parameter to ProgramA. So graphically it looks like:

ProgramA -> pass parameters into MyVBexe -> process parameters -> MyVBexe returns a parameter to ProgramA
->close MyVBexe

i hope this makes more sense, because I am complete lost in this matter. I know I can do it in C/C++, but I need to use SQL. sorry for the mixup