Spool is a command that is recognized by SQL developer. It is not available when you're working with ADO.NET commands.
Some options you have
- Spool the data into a file using SQL Developer or SQL*Plus
- Using ADO.NET loop through the result set in VB.NET and for each line append the data into a file
- Using a stored procedure write the data into a file on the server side. For this you can use
UTL_FILE[
^]