you cannot use sql*plus settings in a proc, you surely must run the sql then ure vb program must format the ouptut - just like sql*plus does